aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attributes.rb
Commit message (Collapse)AuthorAgeFilesLines
* Don't attempt to save dirty attributes which are not persistableSean Griffin2015-01-101-0/+7
| | | | | | | | | | | | | | | | This sets a precident for how we handle `attribute` calls, which aren't backed by a database column. We should not take this as a conscious decision on how to handle them, and this can change when we make `attribute` public if we have better ideas in the future. As the composed attributes API gets fleshed out, I expect the `persistable_attributes` method to change to `@attributes.select(&:persistable).keys`, or some more performant variant there-of. This can probably go away completely once we fully move dirty checking into the attribute objects once it gets moved up to Active Model. Fixes #18407
* Extract an explicit type caster classSean Griffin2014-12-291-0/+1
|
* docs, replace ` with + for proper rdoc output. [ci skip]Yves Senn2014-12-231-2/+2
|
* Don't modify the columns hash to set defaults from the attributes APISean Griffin2014-10-311-3/+20
| | | | | Nothing is directly using the columns for the default values anymore. This step helps us get closer not not mutating the columns hash.
* Simplify creation of default attributes on AR instanceSean Griffin2014-06-291-2/+1
| | | | `AttributeSet#dup` has all the behavior we need.
* add missing `:nodoc:` for recent refactorings. [ci skip]Yves Senn2014-06-241-1/+1
| | | | | | | | | | Adding `# :nodoc:` to the parent `class` / `module` is not going to ignore nested classes or modules. There is a modifier `# :nodoc: all` but sadly the containing class or module will continue to be in the docs. /cc @sgrif
* Small typoAnton Cherepanov2014-06-231-1/+1
|
* Introduce an object to aid in creation and management of `@attributes`Sean Griffin2014-06-191-4/+5
| | | | | Mostly delegation to start, but we can start moving a lot of behavior in bulk to this object.
* Rename `property` to `attribute`Sean Griffin2014-06-071-0/+122
| | | | For consistency with https://github.com/rails/rails/pull/15557
* Revert "Refactoring attributes/types" [#3348 state:open]Pratik Naik2010-01-221-37/+0
| | | | | | | | | | | | | | | | | 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.
* Refactoring attributes/types [#3348 state:resolved]Eric Chapweske2009-10-171-0/+37
Signed-off-by: Joshua Peek <josh@joshpeek.com>