Skip to content

Commit 9c8826b

Browse files
committed
[ci skip] Mention the change in nil handling for serialized attributes
in "Upgrading from Rails 3.2 to Rails 4.0"
1 parent 48cd7d3 commit 9c8826b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

guides/source/upgrading_ruby_on_rails.md

+3
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,9 @@ Rails 4.0 no longer supports loading plugins from `vendor/plugins`. You must rep
592592

593593
* Rails 4.0 has changed `serialized_attributes` and `attr_readonly` to class methods only. You shouldn't use instance methods since it's now deprecated. You should change them to use class methods, e.g. `self.serialized_attributes` to `self.class.serialized_attributes`.
594594

595+
* When using the default coder, assigning `nil` to a serialized attribute will save it
596+
to the database as `NULL` instead of passing the `nil` value through YAML (`"--- \n...\n"`).
597+
595598
* Rails 4.0 has removed `attr_accessible` and `attr_protected` feature in favor of Strong Parameters. You can use the [Protected Attributes gem](https://github.com/rails/protected_attributes) for a smooth upgrade path.
596599

597600
* If you are not using Protected Attributes, you can remove any options related to

0 commit comments

Comments
 (0)