diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 02:13:00 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 04:12:33 -0300 |
commit | b451de0d6de4df6bc66b274cec73b919f823d5ae (patch) | |
tree | f252c4143a0adb3be7d36d543282539cca0fb971 /railties/guides/source/association_basics.textile | |
parent | 1590377886820e00b1a786616518a32f3b61ec0f (diff) | |
download | rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.gz rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.bz2 rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.zip |
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'railties/guides/source/association_basics.textile')
-rw-r--r-- | railties/guides/source/association_basics.textile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/association_basics.textile b/railties/guides/source/association_basics.textile index fd1e7f4baf..079bb4b6b2 100644 --- a/railties/guides/source/association_basics.textile +++ b/railties/guides/source/association_basics.textile @@ -1401,8 +1401,8 @@ person = Person.create(:name => 'honda') post = Post.create(:name => 'a1') person.posts << post person.posts << post -person.posts.inspect # => [#<Post id: 7, name: "a1">] -Reading.all.inspect # => [#<Reading id: 16, person_id: 7, post_id: 7>, #<Reading id: 17, person_id: 7, post_id: 7>] +person.posts.inspect # => [#<Post id: 7, name: "a1">] +Reading.all.inspect # => [#<Reading id: 16, person_id: 7, post_id: 7>, #<Reading id: 17, person_id: 7, post_id: 7>] </ruby> In the above case there are still two readings. However +person.posts+ shows only one post because the collection loads only unique records. |