mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove method redefined warning
This commit is contained in:
4
test/fixtures/poro.rb
vendored
4
test/fixtures/poro.rb
vendored
@@ -11,8 +11,6 @@ class Model
|
||||
end
|
||||
|
||||
class ModelSerializer < ActiveModel::Serializer
|
||||
attributes :attr1, :attr2
|
||||
|
||||
def attr2
|
||||
attr2 = object.read_attribute_for_serialization(:attr2)
|
||||
if scope
|
||||
@@ -21,4 +19,6 @@ class ModelSerializer < ActiveModel::Serializer
|
||||
attr2
|
||||
end
|
||||
end
|
||||
|
||||
attributes :attr1, :attr2
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user