Change to 1.9 Hash syntax in docs

This commit is contained in:
Andre Meij
2013-06-18 16:40:14 +02:00
parent 88ff42ebc8
commit 54ce37b956
3 changed files with 23 additions and 23 deletions

View File

@@ -358,8 +358,8 @@ Here is an example:
<pre lang="ruby">
class UserSerializer < ActiveModel::Serializer
has_many :followed_posts, :key => :posts
has_one :owned_account, :key => :account
has_many :followed_posts, key: :posts
has_one :owned_account, key: :account
end
</pre>
@@ -370,8 +370,8 @@ to set it explicitly:
<pre lang="ruby">
class UserSerializer < ActiveModel::Serializer
has_many :followed_posts, :key => :posts, :serializer => CustomPostSerializer
has_one :owne_account, :key => :account, :serializer => PrivateAccountSerializer
has_many :followed_posts, key: :posts, serializer: CustomPostSerializer
has_one :owne_account, key: :account, serializer: PrivateAccountSerializer
end
</pre>