Skip to content

Backport #8078: Fix `attributes_before_type_cast` for serialised attributes #8082

Merged
merged 1 commit into from Nov 9, 2012

3 participants

@nikitug
nikitug commented Oct 31, 2012

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.

@frodsan frodsan commented on an outdated diff Oct 31, 2012
activerecord/CHANGELOG.md
@@ -162,6 +162,10 @@
*Seamus Abshere*
+* `AR::Base#attributes_before_type_cast` now returns unserialized values for serialized attributes.
@frodsan
frodsan added a note Oct 31, 2012

new CHANGELOG entries go to the top of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@nikitug
nikitug commented Oct 31, 2012

@frodsan fixed

@carlosantoniodasilva
Ruby on Rails member

Thanks @nikitug. We'll merge it after 3.2.9 is out (it can't go now that the rc is out).

@carlosantoniodasilva
Ruby on Rails member

@nikitug can you rebase from 3-2-stable please? Github says it cannot be merged anymore, probably the changelog. Thanks.

@nikitug nikitug Backport #8078: Fix `attributes_before_type_cast` for serialised attr…
…ibutes.

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.
8dbf5a4
@carlosantoniodasilva carlosantoniodasilva merged commit c7ef6b6 into rails:3-2-stable Nov 9, 2012
@carlosantoniodasilva
Ruby on Rails member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.