From ee917493e451e552fef18367f8bcba2f36080685 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sat, 3 Nov 2012 01:41:44 +0530 Subject: copy edits [ci skip] --- activerecord/lib/active_record/errors.rb | 9 +++------ 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`. -- cgit v1.2.3