aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionview/lib/action_view/record_identifier.rb7
-rw-r--r--activerecord/lib/active_record/locking/optimistic.rb2
2 files changed, 5 insertions, 4 deletions
diff --git a/actionview/lib/action_view/record_identifier.rb b/actionview/lib/action_view/record_identifier.rb
index 818a60103f..c8484bed34 100644
--- a/actionview/lib/action_view/record_identifier.rb
+++ b/actionview/lib/action_view/record_identifier.rb
@@ -35,8 +35,9 @@ module ActionView
#
# Note that these methods do not strictly require +Post+ to be a subclass of
# ActiveRecord::Base.
- # Any +Post+ class will do as long as its instances respond to +post.to_key+
- # and +post.model_name.param_key+; for instance:
+ # Any +Post+ class will work as long as its instances respond to +to_key+
+ # and +model_name+, given that +model_name+ responds to +param_key+.
+ # For instance:
#
# class Post
# attr_accessor :to_key
@@ -46,7 +47,7 @@ module ActionView
# end
#
# def self.find(id)
- # new.tap{|post| post.to_key = [id]}
+ # new.tap { |post| post.to_key = [id] }
# end
# end
module RecordIdentifier
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb
index 7bca38c910..9f053453bd 100644
--- a/activerecord/lib/active_record/locking/optimistic.rb
+++ b/activerecord/lib/active_record/locking/optimistic.rb
@@ -11,7 +11,7 @@ module ActiveRecord
#
# == Usage
#
- # Active Records support optimistic locking if the field +lock_version+ is present. Each update to the
+ # Active Record supports optimistic locking if the +lock_version+ field is present. Each update to the
# record increments the +lock_version+ column and the locking facilities ensure that records instantiated twice
# will let the last one saved raise a +StaleObjectError+ if the first was also updated. Example:
#