aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Refactoring attributes/types" [#3348 state:open]Pratik Naik2010-01-225-22/+117
| | | | | | | | | | | | | | | | | This reverts commit f936a1f100e75082081e782e5cceb272885c2df7. Conflicts: activerecord/lib/active_record.rb activerecord/lib/active_record/base.rb Revert "Fixed: #without_typecast should only disable typecasting on the duplicated attributes" [#3387 state:open] This reverts commit 2831996483c6a045f1f38d8030256eb58d9771c3. Reason : It's not generating attribute methods properly, making object.column 5x slower.
* Object#tap is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-2/+0
|
* Refactoring attributes/types [#3348 state:resolved]Eric Chapweske2009-10-175-117/+22
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* I added this feature so that a Map of changed fields could be retrievedJosh Sharpe2009-08-311-2/+9
| | | | | | | | | | | | | | | | | | | | after a model had been saved. This is useful in the after_save callback when you need to know what fields changed. At present there is no way to do this other than have code in the before_save callback that takes a copy of the changes Map, which I thought was a bit messy. Example. person = Person.find_by_name('bob') person.name = 'robert' person.changes # => {'name' => ['bob, 'robert']} person.save person.changes # => {} person.previous_changes # => {'name' => ['bob, 'robert']} person.reload person.previous_changes # => {} Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Extract common dirty tracking methods in AMoJoshua Peek2009-08-101-114/+9
|
* AMo overrides alias_attribute and manages aliasing all known attribute ↵Joshua Peek2009-08-101-17/+0
| | | | method matchers
* Serialized attributes should only be saved with partial_updates when the ↵Mike Breen2009-08-091-1/+1
| | | | | | serialized attribute is present [#2397 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ruby 1.9.2: Object#id is gone nowJeremy Kemper2009-08-071-1/+1
|
* Extract generic attribute method generation to AMoJoshua Peek2009-08-043-5/+5
|
* Added reset_attribute! method to ActiveRecord::AttributeMethods::Dirty which ↵Paul Gillard2009-08-041-12/+29
| | | | | | will reset an attribute to its original value should it have changed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Modified ActiveRecord::AttributeMethods to allow classes to specify ↵Paul Gillard2009-08-043-4/+4
| | | | | | attribute method prefixes and/or suffixes. Previously only suffixes were allowed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Track generated attribute methods in a separate moduleJoshua Peek2009-08-023-5/+5
|
* Start separating primary key concernsJoshua Peek2009-07-301-0/+44
|
* Move attribute_types_cached_by_default into attribute methods reading concernJoshua Peek2009-07-301-0/+11
|
* Don't need to pass attr_name to evaluate_attribute_method anymoreJoshua Peek2009-07-303-5/+5
|
* Undefine id and let it automatically be generatedJoshua Peek2009-07-301-11/+2
|
* Redirect method missing for primary key to read_attributeJoshua Peek2009-07-301-2/+2
|
* ditto for id=Joshua Peek2009-07-301-5/+1
|
* Don't define id_before_type_cast, just let it be generated on its ownJoshua Peek2009-07-301-5/+5
|
* Move id attribute methods into their related concernJoshua Peek2009-07-303-0/+28
|
* cache_attributes is related to attribute readingJoshua Peek2009-07-301-0/+19
|
* Generate methods for all suffixesJoshua Peek2009-07-301-3/+8
|
* Concernify AR AttributeMethodsJoshua Peek2009-07-306-0/+420