Update readme to use full class names for serializer rather than the symbol #19

This commit is contained in:
Jonathan Richard Henry Evans (JRHE) 2014-07-23 13:42:07 +01:00
parent 92a2a5ba82
commit 4bef8357df

View file

@ -85,18 +85,18 @@ end
```ruby
# Serializer options can be specified on routes or namespaces.
namespace 'foo', :serializer => :bar do
namespace 'foo', :serializer => BarSerializer do
get "/" do
# will use "bar" serializer
end
# Options specified on a route or namespace override those of the containing namespace.
get "/home", :serializer => :home do
get "/home", :serializer => HomeSerializer do
# will use "home" serializer
end
# All standard options for `ActiveModel::Serializers` are supported.
get "/fancy_homes", :root => 'world', :each_serializer => :fancy_homes
get "/fancy_homes", :root => 'world', :each_serializer => FancyHomesSerializer
...
end
end