mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Remove dynamically defined instance methods
This commit is contained in:
2
test/fixtures/poro.rb
vendored
2
test/fixtures/poro.rb
vendored
@@ -116,7 +116,7 @@ RoleSerializer = Class.new(ActiveModel::Serializer) do
|
||||
attributes :id, :name, :description, :slug
|
||||
|
||||
def slug
|
||||
"#{name}-#{id}"
|
||||
"#{object.name}-#{object.id}"
|
||||
end
|
||||
|
||||
belongs_to :author
|
||||
|
||||
Reference in New Issue
Block a user