Remove unneeded method aliasing of attribute reader: object, with the underscored class name of serializer, to fix issue where a model's attribute name matches that of the underscored prefix of the serializer

This commit is contained in:
Kevin Tham
2012-11-24 23:55:14 -08:00
parent 720f1dabf8
commit 14a35ab2f8
3 changed files with 19 additions and 2 deletions

View File

@@ -226,7 +226,6 @@ module ActiveModel
name = klass.name.demodulize.underscore.sub(/_serializer$/, '')
klass.class_eval do
alias_method name.to_sym, :object
root name.to_sym unless self._root == false
end
end