aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/serialization.rb
Commit message (Collapse)AuthorAgeFilesLines
* removing dead codeAaron Patterson2012-02-091-8/+0
|
* Merge branch 'master' into instance_readerAaron Patterson2012-02-091-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (30 commits) Bump tzinfo. 0.3.31 was released on November 6, 2011. Fix GH #4909. Dependency on TZInfo move from AR to AS. moving ordered hash to normal hash because ruby 1.9.3 hash defaultly ordered one Refactored the OrderedHash related stuff Replaced OrderedHash usage with Ruby 1.9 Hash Replaced OrderedHash with Hash for ruby 1.9 series removed unnecessary code replacing the orderhash with hash for ruby-1.9 Clean up some wording. Fix typo. test title changed corresponding to the test replaced active support ordered hash to ruby hash on active resource PostgreSQL does not work in the same way of the other adapters AR::Relation#pluck: improve to work with joins Fix match docs Fix attribute_before_type_cast for serialized attributes. Fixes #4837. Fix failing request test Fixes in AMo README Update README to mention lint. Trim down Active Model API by removing valid? and errors.full_messages ...
| * Fix attribute_before_type_cast for serialized attributes. Fixes #4837.Jon Leighton2012-02-071-0/+8
| |
* | give each PG type a `type` method and decortate tz attributesAaron Patterson2012-02-071-0/+4
| |
* | wrap and cache columns for typecastingAaron Patterson2012-02-071-0/+10
| |
* | moved most of the evald code in to regular ruby codeAaron Patterson2012-02-071-2/+2
| |
* | copy the columns hash to the active record instances, typecast using columns ↵Aaron Patterson2012-02-071-0/+8
|/ | | | looked up on the instance
* Support configuration on ActiveRecord::Model.Jon Leighton2011-12-281-1/+1
| | | | | | | | | | | | | | | The problem: We need to be able to specify configuration in a way that can be inherited to models that include ActiveRecord::Model. So it is no longer sufficient to put 'top level' config on ActiveRecord::Base, but we do want configuration specified on ActiveRecord::Base and descendants to continue to work. So we need something like class_attribute that can be defined on a module but that is inherited when ActiveRecord::Model is included. The solution: added ActiveModel::Configuration module which provides a config_attribute macro. It's a bit specific hence I am not putting this in Active Support or making it a 'public API' at present.
* Make read_attribute code path accessible at the class levelJon Leighton2011-12-221-8/+12
|
* Remove the need for type_cast_attribute.Jon Leighton2011-12-011-8/+0
| | | | This is good because it reduces duplication.
* Don't rely on underscore-prefixed attribute methods.Jon Leighton2011-12-011-7/+4
| | | | | | Define singleton methods on the attributes module instead. This reduces method pollution on the actual model classes. It also seems to make something faster, I am unsure why! O_o
* consistencyJon Leighton2011-11-301-4/+4
|
* Don't check column type, you might implement a custom coder that serializes ↵Jon Leighton2011-11-301-1/+1
| | | | to a different type
* omg computer science!Jon Leighton2011-11-301-18/+34
| | | | | | | Implement a mini state machine for serialized attributes. This means we do not have to deserialize the values upon initialization, which means that if we never actually access the attribute, we never have to deserialize it.
* Don't need second paramJon Leighton2011-11-301-1/+1
|
* Move some serialization stuff out of BaseJon Leighton2011-11-301-0/+42
|
* Extract attribute serialization code into a separate moduleJon Leighton2011-11-301-0/+42