Sha256: 802325cfcee1fdf21605cd3cdeb919256d6c9b9462811e279306db31eda81937

Contents?: true

Size: 210 Bytes

Versions: 15

Compression:

Stored size: 210 Bytes

Contents

class MonkeySerializer < ActiveModel::Serializer
  attributes :name, :color, :description, :created_at

  def description
    "#{object.name} is #{object.color} and was born on #{object.created_at}."
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
grape_ape_rails-0.9.13 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.12 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.11 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.10 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.9 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.8 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.7 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.6 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.5 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.4 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.3 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.2 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.9.1 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.5.1 spec/dummy/app/models/monkey_serializer.rb
grape_ape_rails-0.5.0 spec/dummy/app/models/monkey_serializer.rb