Skip to content

Commit

Permalink
Fix creation example in nested attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
oggy committed Sep 29, 2009
1 parent a14a8a6 commit 10f3cf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/nested_attributes.rb
Expand Up @@ -46,7 +46,7 @@ module NestedAttributes #:nodoc:
# create the member and avatar in one go: # create the member and avatar in one go:
# #
# params = { :member => { :name => 'Jack', :avatar_attributes => { :icon => 'smiling' } } } # params = { :member => { :name => 'Jack', :avatar_attributes => { :icon => 'smiling' } } }
# member = Member.create(params) # member = Member.create(params['member'])
# member.avatar.id # => 2 # member.avatar.id # => 2
# member.avatar.icon # => 'smiling' # member.avatar.icon # => 'smiling'
# #
Expand Down

0 comments on commit 10f3cf0

Please sign in to comment.