aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/serialization.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2013-11-071-0/+3
|\
| * warning about saving models with dirty attributesDamien Mathieu2013-10-231-0/+3
| | | | | | | | See #8328
* | `ActiveRecord::Store` works together with PG `hstore` columns.Yves Senn2013-10-251-0/+4
|/ | | | | | This is necessary because as of 5ac2341 `hstore` columns are always stored as `Hash` with `String` keys. `ActiveRecord::Store` expected the attribute to be an instance of `HashWithIndifferentAccess`, which led to the bug.
* fix serialization type cast when value is already unserializedJan Berdajs2013-06-051-1/+5
|
* the typecast value should be passed to the serializer. fixes #10830Aaron Patterson2013-06-051-5/+5
|
* Remove instance level serialized_attributes setting was deprecated.kennyj2013-06-021-7/+0
|
* fix :nodoc: mark on AR::AttributeMethods::Serialization [ci skip]Francesco Rodriguez2013-04-121-2/+2
|
* update ActiveRecord::AttributeMethods::Serialization documentation [ci skip]Francesco Rodriguez2013-04-041-0/+7
|
* Serialized attribute can be serialized in an integer columnRafael Mendonça França2012-12-211-0/+8
| | | | Fix #8575
* Keep the code related to serialization in Serialization module.Nikita Afanasenko2012-11-101-1/+9
| | | | We should not need any `serialized_attributes` checks outside `ActiveRecord::AttributeMethods::Serialization` module.
* Fix `attributes_before_type_cast` for serialised attributes.Nikita Afanasenko2012-10-311-0/+10
| | | | Public method `attributes_before_type_cast` used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like `read_attribute_before_type_cast` and returns unserialised values.
* Make caller attribute in deprecation methods optionalAlexey Gaziev2012-10-301-1/+1
|
* Provide a call stack for deprecation warnings where needed.Nikita Afanasenko2012-10-291-1/+2
| | | | It's sometimes hard to quickly find where deprecated call was performed, especially in case of migrating between Rails versions. So this is an attempt to improve the call stack part of the warning message by providing caller explicitly.
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-281-8/+11
|\ | | | | | | | | Conflicts: actionpack/lib/action_view/helpers/asset_tag_helper.rb
| * update AR/attribute_methods documentation [ci skip]Francesco Rodriguez2012-09-211-8/+11
| |
* | Removing dead code. attribute_cast_code is not called.kennyj2012-09-281-10/+0
|/
* Use instance_accessor: false instead of instance_writer.kennyj2012-08-211-2/+7
|
* Pull more serialize code into a lazy included moduleJon Leighton2012-08-171-60/+63
|
* Optimize instantiation for models which don't use serializeJon Leighton2012-08-171-13/+20
| | | | Those z's were hard to type.
* Added *instance_writer: false* for stored/serialized attributes.kennyj2012-07-071-1/+1
|
* Simplify AR configuration code.Jon Leighton2012-06-151-1/+1
| | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* Fix #5797. Error calling dup method on AR model with serialized fieldkennyj2012-05-301-3/+4
|
* 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