Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed typos in activerecord | Prathamesh Sonpatki | 2013-03-27 | 1 | -1/+1 |
| | |||||
* | When we pass id to update_attributes it will try to set new id for that record | Dmitry Vorotilin | 2013-03-22 | 1 | -1/+1 |
| | |||||
* | fix typos in AR. lots of them. | Vipul A M | 2013-03-19 | 1 | -1/+1 |
| | |||||
* | Keep the code related to serialization in Serialization module. | Nikita Afanasenko | 2012-11-10 | 1 | -8/+4 |
| | | | | We should not need any `serialized_attributes` checks outside `ActiveRecord::AttributeMethods::Serialization` module. | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-11-03 | 1 | -10/+15 |
|\ | | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/metal/mime_responds.rb activerecord/lib/active_record/attribute_methods.rb guides/source/working_with_javascript_in_rails.md | ||||
| * | read_attribute is public [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -1/+1 |
| | | |||||
| * | improve AR::AttributeMethods documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -6/+10 |
| | | |||||
| * | Fix AR::AttributeMethods#[] example [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -1/+1 |
| | | |||||
* | | AR::AttributeMethods#[] raises AM::AttributeMissingError for missing attributes. | Francesco Rodriguez | 2012-10-28 | 1 | -2/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following behaviour: class Person < ActiveRecord::Base belongs_to :company end # Before: person = Person.select('id').first person[:name] # => nil person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => nil person.company # => nil # After: person = Person.select('id').first person[:name] # => ActiveModel::MissingAttributeError: missing_attribute: name person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => ActiveModel::MissingAttributeError: missing_attribute: company_id person.company # => ActiveModel::MissingAttributeError: missing_attribute: company_id Fixes #5433. | ||||
* | | Remove ActiveRecord::Model | Jon Leighton | 2012-10-26 | 1 | -1/+1 |
|/ | | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced. | ||||
* | update AR::AttributeMethods documentation [ci skip] | Francesco Rodriguez | 2012-10-21 | 1 | -23/+124 |
| | |||||
* | Support for partial inserts. | Jon Leighton | 2012-09-28 | 1 | -5/+5 |
| | | | | | | | | | | | When inserting new records, only the fields which have been changed from the defaults will actually be included in the INSERT statement. The other fields will be populated by the database. This is more efficient, and also means that it will be safe to remove database columns without getting subsequent errors in running app processes (so long as the code in those processes doesn't contain any references to the removed column). | ||||
* | load active_support/deprecation in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | |||||
* | no need to define methods in included hook | Jon Leighton | 2012-06-15 | 1 | -13/+13 |
| | |||||
* | Use each_with_object instead of each here | Santiago Pastorino | 2012-06-09 | 1 | -3/+3 |
| | |||||
* | Merge pull request #6687 from tiegz/3-2-optimizations | José Valim | 2012-06-09 | 1 | -1/+3 |
| | | | | ActiveRecord#attributes optimization: minimize objects created | ||||
* | much code can be deleted thanks to @tenderlove's refactoring | Jon Leighton | 2012-03-28 | 1 | -8/+0 |
| | |||||
* | Merge pull request #5294 from robinroestenburg/master | Aaron Patterson | 2012-03-12 | 1 | -23/+50 |
|\ | | | | | Refactoring of `arel_attributes_values` method | ||||
| * | Removed flag attributes. | Robin Roestenburg | 2012-03-06 | 1 | -19/+32 |
| | | |||||
| * | Refactored method arel_attributes_values. | Robin Roestenburg | 2012-03-06 | 1 | -20/+34 |
| | | |||||
* | | attribute_present? should return false for empty strings | Jacob Green | 2012-03-06 | 1 | -1/+1 |
|/ | |||||
* | handle id attribute in PrimaryKey module | Sergey Nartimov | 2012-02-11 | 1 | -1/+1 |
| | |||||
* | adding a comment for myself | Aaron Patterson | 2012-02-06 | 1 | -0/+1 |
| | |||||
* | Fix another race condition. | Jon Leighton | 2012-01-20 | 1 | -3/+0 |
| | | | | | | From 2c667f69aa2daac5ee6c29ca9679616e2a71532a. Thanks @pwnall for the heads-up. | ||||
* | Fix race condition :bomb: | Jon Leighton | 2012-01-13 | 1 | -4/+11 |
| | |||||
* | Revert "Base#[] and Base#[]= are aliases so implement them as aliases :)" | Tom Stuart | 2012-01-11 | 1 | -4/+6 |
| | | | | This reverts commit 21eadc1b3f2eb818a4833381ee0a6cfa205f2955. | ||||
* | Support establishing connection on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -1/+1 |
| | | | | | This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base. | ||||
* | Ensure attribute methods are included after all the AR stuff | Jon Leighton | 2011-12-24 | 1 | -1/+1 |
| | |||||
* | Extract common logic into a method | Jon Leighton | 2011-12-24 | 1 | -1/+1 |
| | |||||
* | Fix situation where id method didn't get defined causing postgres to fail | Jon Leighton | 2011-12-23 | 1 | -4/+3 |
| | |||||
* | Fix #4046. | Jon Leighton | 2011-12-23 | 1 | -42/+33 |
| | |||||
* | remove deprecated underscore versions of attribute methods | Sergey Nartimov | 2011-12-21 | 1 | -1/+0 |
| | |||||
* | Let AttributeMethods do its own including etc | Jon Leighton | 2011-12-15 | 1 | -0/+23 |
| | |||||
* | Split out most of the AR::Base code into separate modules :cake: | Jon Leighton | 2011-12-15 | 1 | -2/+113 |
| | |||||
* | Use a separate module for 'external' attribute methods. | Jon Leighton | 2011-12-14 | 1 | -0/+14 |
| | |||||
* | Remove the need for type_cast_attribute. | Jon Leighton | 2011-12-01 | 1 | -0/+4 |
| | | | | This is good because it reduces duplication. | ||||
* | Remove unnecessary *args | Jon Leighton | 2011-12-01 | 1 | -2/+2 |
| | |||||
* | Stop trying to be clever about when to define attribute methods. | Jon Leighton | 2011-09-14 | 1 | -10/+1 |
| | | | | | | | | | There is no meaningful performance penalty in defining attribute methods, since it only happens once. There is also no reason *not* to define them, since they get thrown in an included module, so they will not 'overwrite' anything. In fact, this is desirable, since it allows us to call super. | ||||
* | We don't need to build a set for DangerousAttributeError. | Jon Leighton | 2011-09-14 | 1 | -7/+13 |
| | | | | We can just use method_defined? and private_method_defined? | ||||
* | Deprecate using method_missing for attributes that are columns. | Jon Leighton | 2011-09-13 | 1 | -0/+15 |
| | | | | | | This shouldn't ever happen unless people are doing something particularly weird, but adding a deprecation in case there are bugs not caught by our tests. | ||||
* | Let Ruby deal with method visibility. | Jon Leighton | 2011-09-13 | 1 | -7/+10 |
| | | | | | | Check respond_to_without_attributes? in method_missing. If there is any method that responds (even private), let super handle it and raise NoMethodError if necessary. | ||||
* | Always generate attribute methods on the base class. | Jon Leighton | 2011-09-13 | 1 | -5/+18 |
| | | | | | | | | | | | | | | This fixes a situation I encountered where a subclass would cache the name of a generated attribute method in @_defined_class_methods. Then, when the superclass has it's attribute methods undefined, the subclass would always have to dispatch through method_missing, because the presence of the attribute in @_defined_class_methods would mean that it is never generated again, even if undefine_attribute_methods is called on the subclass. There various other confusing edge cases like this. STI classes share columns, so let's just keep all the attribute method generation state isolated to the base class. | ||||
* | Fix warnings. | Jon Leighton | 2011-09-13 | 1 | -1/+1 |
| | | | | Make sure we don't redefine an already-defined attribute method. | ||||
* | match method signature of the superclass | Aaron Patterson | 2011-06-30 | 1 | -1/+1 |
| | |||||
* | Move ActiveModel::AttributeMethods#attribute_methods_generated? to ↵ | Alexander Uvarov | 2011-03-01 | 1 | -0/+11 |
| | | | | | | | | ActiveRecord, so it's flexible now [#6428 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | instance_methods includes public and protected, so reduce funcalls and ↵ | Aaron Patterson | 2011-02-18 | 1 | -3/+2 |
| | | | | object allocs | ||||
* | AR::AttributeMethods does not need to be included in an AR::Base class. | Aaron Patterson | 2011-02-18 | 1 | -1/+5 |
| | |||||
* | just use the list of column names to generate attribute methods | Aaron Patterson | 2011-02-18 | 1 | -1/+1 |
| | |||||
* | Work around a strange piece of Syck behaviour where it checks ↵ | Michael Koziarski | 2010-12-02 | 1 | -1/+1 |
| | | | | | | Model#respond_to? before initializing the object. Things like YAML.load(YAML.dump(@post)) won't work without this. | ||||
* | "instance_methods" includes public and protected | Aaron Patterson | 2010-10-19 | 1 | -1/+1 |
| |