diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-03 01:41:44 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-11-03 01:41:44 +0530 |
commit | ee917493e451e552fef18367f8bcba2f36080685 (patch) | |
tree | ab1e3b5e4201fddf045aad8c199e1f2c8d7a12b0 | |
parent | 1c3bdfcda4ddb23b69bf00e13cc6120b4ff428dc (diff) | |
download | rails-ee917493e451e552fef18367f8bcba2f36080685.tar.gz rails-ee917493e451e552fef18367f8bcba2f36080685.tar.bz2 rails-ee917493e451e552fef18367f8bcba2f36080685.zip |
copy edits [ci skip]
-rw-r--r-- | activerecord/lib/active_record/errors.rb | 9 | ||||
-rw-r--r-- | guides/source/contributing_to_ruby_on_rails.md | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/errors.rb b/activerecord/lib/active_record/errors.rb index f039c23675..04c0fbfe70 100644 --- a/activerecord/lib/active_record/errors.rb +++ b/activerecord/lib/active_record/errors.rb @@ -201,12 +201,9 @@ module ActiveRecord # relation = Task.all # relation.loaded? # => true # - # # where! will try to mutate the relation, but this will fails because it's loaded - # relation.where!(title: 'TODO') - # # => ActiveRecord::ImmutableRelation - # - # relation.limit!(5) - # # => ActiveRecord::ImmutableRelation + # # Methods which try to mutate a loaded relation fail. + # relation.where!(title: 'TODO') # => ActiveRecord::ImmutableRelation + # relation.limit!(5) # => ActiveRecord::ImmutableRelation class ImmutableRelation < ActiveRecordError end diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index 6d63697047..3791467584 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -205,10 +205,10 @@ TIP: Changes that are cosmetic in nature and do not add anything substantial to Rails follows a simple set of coding style conventions. -* Use Ruby >= 1.9 syntax. Prefer `{ a: :b }` over `{ :a => :b }`. * Two spaces, no tabs (for indentation). * No trailing whitespace. Blank lines should not have any spaces. * Indent after private/protected. +* Use Ruby >= 1.9 syntax for hashes. Prefer `{ a: :b }` over `{ :a => :b }`. * Prefer `&&`/`||` over `and`/`or`. * Prefer class << self over self.method for class methods. * Use `MyClass.my_method(my_arg)` not `my_method( my_arg )` or `my_method my_arg`. |