diff options
author | Claudio B. <claudiob@users.noreply.github.com> | 2015-04-24 11:54:54 -0700 |
---|---|---|
committer | Claudio B. <claudiob@users.noreply.github.com> | 2015-04-24 11:54:54 -0700 |
commit | ab10f6ef223e2ce02ce60cfc44e865cf9ecf7990 (patch) | |
tree | 6d62ece277562fd0c614fefdb574ff9905480187 | |
parent | b29d794b8cdf59896e668a0f68038dd25228398e (diff) | |
parent | f207d948c86599bb4aaab5fe07a612455d865027 (diff) | |
download | rails-ab10f6ef223e2ce02ce60cfc44e865cf9ecf7990.tar.gz rails-ab10f6ef223e2ce02ce60cfc44e865cf9ecf7990.tar.bz2 rails-ab10f6ef223e2ce02ce60cfc44e865cf9ecf7990.zip |
Merge pull request #19888 from imtayadeway/tw/attribute-methods-docs
Fix grammar/style in attribute methods docs
-rw-r--r-- | activemodel/lib/active_model/attribute_methods.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 96be551264..ff7280f9e5 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -23,7 +23,7 @@ module ActiveModel # The requirements to implement <tt>ActiveModel::AttributeMethods</tt> are to: # # * <tt>include ActiveModel::AttributeMethods</tt> in your class. - # * Call each of its method you want to add, such as +attribute_method_suffix+ + # * Call each of its methods you want to add, such as +attribute_method_suffix+ # or +attribute_method_prefix+. # * Call +define_attribute_methods+ after the other methods are called. # * Define the various generic +_attribute+ methods that you have declared. @@ -227,7 +227,7 @@ module ActiveModel # Declares the attributes that should be prefixed and suffixed by # ActiveModel::AttributeMethods. # - # To use, pass attribute names (as strings or symbols), be sure to declare + # To use, pass attribute names (as strings or symbols). Be sure to declare # +define_attribute_methods+ after you define any prefix, suffix or affix # methods, or they will not hook in. # @@ -239,7 +239,7 @@ module ActiveModel # # # Call to define_attribute_methods must appear after the # # attribute_method_prefix, attribute_method_suffix or - # # attribute_method_affix declares. + # # attribute_method_affix declarations. # define_attribute_methods :name, :age, :address # # private @@ -255,7 +255,7 @@ module ActiveModel # Declares an attribute that should be prefixed and suffixed by # ActiveModel::AttributeMethods. # - # To use, pass an attribute name (as string or symbol), be sure to declare + # To use, pass an attribute name (as string or symbol). Be sure to declare # +define_attribute_method+ after you define any prefix, suffix or affix # method, or they will not hook in. # @@ -267,7 +267,7 @@ module ActiveModel # # # Call to define_attribute_method must appear after the # # attribute_method_prefix, attribute_method_suffix or - # # attribute_method_affix declares. + # # attribute_method_affix declarations. # define_attribute_method :name # # private @@ -363,7 +363,7 @@ module ActiveModel end # Define a method `name` in `mod` that dispatches to `send` - # using the given `extra` args. This fallbacks `define_method` + # using the given `extra` args. This falls back on `define_method` # and `send` if the given names cannot be compiled. def define_proxy_call(include_private, mod, name, send, *extra) #:nodoc: defn = if name =~ NAME_COMPILABLE_REGEXP @@ -419,7 +419,7 @@ module ActiveModel # returned by <tt>attributes</tt>, as though they were first-class # methods. So a +Person+ class with a +name+ attribute can for example use # <tt>Person#name</tt> and <tt>Person#name=</tt> and never directly use - # the attributes hash -- except for multiple assigns with + # the attributes hash -- except for multiple assignments with # <tt>ActiveRecord::Base#attributes=</tt>. # # It's also possible to instantiate related objects, so a <tt>Client</tt> |