Remove dynamically defined instance methods

This commit is contained in:
Benjamin Fleischer
2015-12-02 00:17:00 -06:00
parent 0bf45ec2a7
commit 8804d758ef
2 changed files with 23 additions and 13 deletions

View File

@@ -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