diff options
author | Dimitar Dimitrov <wireman@gmail.com> | 2012-02-22 22:19:42 +0200 |
---|---|---|
committer | Dimitar Dimitrov <wireman@gmail.com> | 2012-02-22 22:19:42 +0200 |
commit | 91148936f770dc8bbbb33d46a09528f1a32d8a71 (patch) | |
tree | 0d1ff8dddd30f838126d540fa11a660808b01be8 | |
parent | b2bfb077b58fac448f3a6bc70292d4685ce182c4 (diff) | |
download | rails-91148936f770dc8bbbb33d46a09528f1a32d8a71.tar.gz rails-91148936f770dc8bbbb33d46a09528f1a32d8a71.tar.bz2 rails-91148936f770dc8bbbb33d46a09528f1a32d8a71.zip |
Minor fixes to ActiveRecord::AutosaveAssociation's docs
* Fix typos
* Remove meaningless code from the examples
-rw-r--r-- | activerecord/lib/active_record/autosave_association.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/autosave_association.rb b/activerecord/lib/active_record/autosave_association.rb index d468663084..ed13bdf68f 100644 --- a/activerecord/lib/active_record/autosave_association.rb +++ b/activerecord/lib/active_record/autosave_association.rb @@ -44,9 +44,6 @@ module ActiveRecord # automatically _and_ atomically: # # post = Post.find(1) - # post.title # => "The current global position of migrating ducks" - # post.author.name # => "alloy" - # # post.title = "On the migration of ducks" # post.author.name = "Eloy Duran" # @@ -78,7 +75,7 @@ module ActiveRecord # When <tt>:autosave</tt> is not declared new children are saved when their parent is saved: # # class Post - # has_many :comments # :autosave option is no declared + # has_many :comments # :autosave option is not declared # end # # post = Post.new(:title => 'ruby rocks') @@ -93,7 +90,8 @@ module ActiveRecord # post.comments.create(:body => 'hello world') # post.save # => saves both post and comment # - # When <tt>:autosave</tt> is true all children is saved, no matter whether they are new records: + # When <tt>:autosave</tt> is true all children are saved, no matter whether they + # are new records or not: # # class Post # has_many :comments, :autosave => true |