Skip to content

Commit

Permalink
added changelog entry, link to guide, and fixed indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
DrSayre committed Apr 9, 2016
1 parent 91f45b2 commit d9f0d61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Fixes:
- [#1488](https://github.com/rails-api/active_model_serializers/pull/1488) Require ActiveSupport's string inflections (@nate00)

Misc:
- [#1673](https://github.com/rails-api/active_model_serializers/pull/1673) Adds "How to" guide on using AMS with POROs (@DrSayre)
- [#1608](https://github.com/rails-api/active_model_serializers/pull/1608) Move SerializableResource to ActiveModelSerializers (@groyoh)
- [#1602](https://github.com/rails-api/active_model_serializers/pull/1602) Add output examples to Adapters docs (@remear)
- [#1557](https://github.com/rails-api/active_model_serializers/pull/1557) Update docs regarding overriding the root key (@Jwan622)
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This is the documentation of ActiveModelSerializers, it's focused on the **0.10.
- [Using ActiveModelSerializers Outside Of Controllers](howto/outside_controller_use.md)
- [Testing ActiveModelSerializers](howto/test.md)
- [Passing Arbitrary Options](howto/passing_arbitrary_options.md)
- [How to serialize a Plain-Old Ruby Object (PORO)](howto/serialize_poro.md)

## Integrations

Expand Down
9 changes: 5 additions & 4 deletions docs/howto/serialize_poro.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ class MyModel
attr_accessor :id, :name, :level

def initialize(attributes)
@id = attributes[:id]
@name = attributes[:name]
@level = attributes[:level]
end
@id = attributes[:id]
@name = attributes[:name]
@level = attributes[:level]
end

def self.model_name
@_model_name ||= ActiveModel::Name.new(self)
end
Expand Down

0 comments on commit d9f0d61

Please sign in to comment.