mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Getting started: attributes.
Super super basic collection of attributes. Nothing fancy.
This commit is contained in:
12
test/fixtures/poro.rb
vendored
Normal file
12
test/fixtures/poro.rb
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
class Model
|
||||
def initialize(hash={})
|
||||
@attributes = hash
|
||||
end
|
||||
end
|
||||
|
||||
class Profile < Model
|
||||
end
|
||||
|
||||
class ProfileSerializer < ActiveModel::Serializer
|
||||
attributes :name, :description
|
||||
end
|
||||
Reference in New Issue
Block a user