diff --git a/README.textile b/README.textile index f31a0ddb..2b7b2acd 100644 --- a/README.textile +++ b/README.textile @@ -355,25 +355,25 @@ h4. Modifying Associations You can also rename associations if required. Say for example you have an association that makes sense to be named one thing in your code, but another when data is serialized. -You can use the :as option to specify a different name for an association. +You can use the option to specify a different name for an association. Here is an exmaple:
 class UserSerializer < ActiveModel::Serializer
-  has_many :followed_posts, :as => :posts
-  has_one :owne_account, :as => :account
+  has_many :followed_posts, :key => :posts
+  has_one :owned_account, :key => :account
 end
 
-Using the :as without a :serializer option will use implicit detection +Using the :key without a :serializer option will use implicit detection to determine a serializer. In this example, you'd have to define two classes: PostSerializer and AccountSerializer. You can also add the :serializer option to set it explicitly:
 class UserSerializer < ActiveModel::Serializer
-  has_many :followed_posts, :as => :posts, :serializer => CustomPostSerializer
-  has_one :owne_account, :as => :account, :serializer => PrivateAccountSerializer
+  has_many :followed_posts, :key => :posts, :serializer => CustomPostSerializer
+  has_one :owne_account, :key => :account, :serializer => PrivateAccountSerializer
 end