mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Merge pull request #161 from kevins90/fix_attr_name_as_serializer_underscored_prefix
Fix serialization of attribute whose name matches the serializer prefix underscored
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user