aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing white-spacesGuillermo Iguaran2011-06-051-1/+1
|
* Remove extra white spaces on ActiveRecord docs.Sebastian Martinez2011-05-231-1/+1
|
* Avoid define_method if possible.José Valim2011-04-192-2/+2
|
* Return nil from read_attribute(:foo) if 'foo' is not present in the ↵Jon Leighton2011-04-151-1/+1
| | | | @attributes hash, but the _foo method has been defined. This brings the behaviour into line with the 3-0-stable branch and the master branch before 93641ed6c8c684f6b4db02b6c8a22fa9bc7f0eaf (there were previously no assertions about this which is why the change slipped through). Note that actually calling the 'foo' method will still raise an error if the attribute is not present.
* Undo performances regressions I introduced in ↵Jon Leighton2011-04-151-5/+23
| | | | bbe0a507f287c20ab4ae8a244fbfc810665deda5 and add test for an edge case. Add comments to explain the intent of the code.
* Remove unnecessary code from define_read_method and add assertion to make ↵Jon Leighton2011-04-151-7/+4
| | | | sure the underscored version is actually generated
* Fixes performance issue introduced in 3.0.6 (issue #6695)Stian Grytøyr2011-04-141-3/+5
|
* Remove `#among?` from Active SupportPrem Sichanugrist2011-04-131-1/+1
| | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
* Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵David Heinemeier Hansson2011-04-121-1/+1
| | | | suggestion!
* Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-111-1/+2
| | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
* Quote find_in_batches ORDER BY clause [#6620 state:resolved]Andrew White2011-03-291-1/+12
|
* Added new #update_column method.Sebastian Martinez2011-03-271-0/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Fix before_type_cast for timezone aware attributes by caching converted ↵Adam Meehan2011-03-231-4/+5
| | | | value on write. Also remove read method reload arg on timezone attributes.
* use class_eval with a string when it's possibleSantiago Pastorino2011-03-222-5/+13
|
* Allow to read and write AR attributes with non valid identifiersSantiago Pastorino2011-03-222-2/+7
|
* Merge remote branch 'rails/master' into identity_mapEmilio Tagua2011-02-153-26/+37
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/examples/performance.rb activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/nested_attributes.rb activerecord/test/cases/relations_test.rb
| * primary keys should not be cleared on cache clear, fixing oracle testsAaron Patterson2011-02-081-0/+1
| |
| * avoid nil.dupAkira Matsuda2011-02-071-1/+1
| | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * make sure de-serialization happens on object instantiationAaron Patterson2011-02-012-3/+2
| |
| * store the serialized column values in the @attributes hashAaron Patterson2011-02-011-1/+2
| |
| * move the coders to the serialized_attributes hashAaron Patterson2011-02-011-7/+3
| |
| * Make before_type_cast available for datetime fieldsAkira Matsuda2011-02-011-2/+3
| | | | | | | | | | | | [#3973 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
| * use an identity conversion to avoid conditional codesAaron Patterson2011-01-281-2/+2
| |
| * join the cult of cargo. reduce the number of NoMethodErrors in the systemAaron Patterson2011-01-071-1/+1
| |
| * no need for to_symAaron Patterson2011-01-071-1/+1
| |
| * String#insert() mutates the string, so no need for lasgnAaron Patterson2011-01-071-1/+1
| |
| * fewer funcalls to the cached attributes variableAaron Patterson2011-01-071-1/+1
| |
| * stop redifining methods on every call to set_primary_keyAaron Patterson2010-12-241-4/+11
| |
| * returning id (for some yet to be discovered reason)Aaron Patterson2010-12-201-1/+1
| |
| * define_attr_method must serialize nil correctlyAaron Patterson2010-12-201-2/+6
| |
| * if there is no base name, we cannot determine a primary keyAaron Patterson2010-12-201-2/+4
| |
| * remove some lasignsAaron Patterson2010-12-201-6/+6
| |
* | Merge remote branch 'rails/master' into identity_mapEmilio Tagua2010-12-204-12/+17
|\| | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/association_proxy.rb activerecord/lib/active_record/autosave_association.rb activerecord/lib/active_record/base.rb activerecord/lib/active_record/persistence.rb
| * Ensure that boolean false is properly serialized [#6079 state:resolved]Aditya Sanghi2010-12-081-1/+2
| |
| * Fix indentation hereSantiago Pastorino2010-12-041-7/+8
| |
| * attributes_before_type_cast are just the value of @attributesSantiago Pastorino2010-12-041-1/+1
| |
| * class inheritable attributes is used no more! all internal use of class ↵Josh Kalderimis2010-11-202-3/+6
| | | | | | | | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com>
* | Remove objects from identity map if save! failed, otherwise finding again ↵Emilio Tagua2010-11-191-0/+3
| | | | | | | | the same record will have invalid attributes.
* | Remove objects from identity map if save failed, otherwise finding again the ↵Emilio Tagua2010-11-191-0/+2
|/ | | | same record will have invalid attributes.
* use persisted? instead of new_record? wherever possibleDavid Chelimsky2010-11-091-3/+4
| | | | | | | | | | | - persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Make should_record_timestamps? serialization aware rather than object#changed?Pratik Naik2010-11-021-4/+0
|
* Ensure save always updates timestamps when serialized attributes are presentPratik Naik2010-11-021-0/+4
|
* No need for parenthesis hereSantiago Pastorino2010-10-171-1/+1
|
* no need to check for nilNeeraj Singh2010-10-171-1/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* No need to use inject here, use map instead.Emilio Tagua2010-09-221-4/+1
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Cheaper attribute reads and respond_to?. Add underscore-prefixed method ↵Jeremy Kemper2010-09-092-5/+10
| | | | aliased to the attribute name so it can be overridden but still called internally.
* Cache unserialized attributesJeremy Kemper2010-09-091-5/+9
|
* Replacing superclass_delegating_accessoror with class_attribute.Neeraj Singh2010-08-311-1/+1
| | | | | | | :partial_attributes will have value true or false so there is no danger of mutability here. Signed-off-by: José Valim <jose.valim@gmail.com>
* Revert "Makes AR use AMo to_key implementation"Santiago Pastorino2010-08-151-0/+6
| | | | This reverts commit 36a84a4f15f29b41c7cac2f8de410055006a8a8d.
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-142-2/+2
| | | | 's/[ \t]*$//' -i {} \;)