Skip to content
This repository
Browse code

Fix a bunch of minor spelling mistakes

  • Loading branch information...
commit ccf9577aee86ce1f766c5e8854e0c285dc38f8ac 1 parent 2148e2c
Evgeniy Dolzhenko authored June 11, 2010

Showing 42 changed files with 67 additions and 67 deletions. Show diff stats Hide diff stats

  1. 8  actionmailer/lib/action_mailer/base.rb
  2. 2  actionmailer/lib/action_mailer/deprecated_api.rb
  3. 2  actionpack/lib/abstract_controller/base.rb
  4. 2  actionpack/lib/action_controller/metal/request_forgery_protection.rb
  5. 4  actionpack/lib/action_controller/test_case.rb
  6. 2  actionpack/lib/action_dispatch/http/mime_type.rb
  7. 2  actionpack/lib/action_dispatch/http/parameters.rb
  8. 4  actionpack/lib/action_dispatch/http/upload.rb
  9. 2  actionpack/lib/action_dispatch/middleware/stack.rb
  10. 2  actionpack/lib/action_dispatch/testing/assertions/selector.rb
  11. 4  actionpack/lib/action_dispatch/testing/test_response.rb
  12. 6  actionpack/lib/action_view/helpers/form_helper.rb
  13. 4  actionpack/lib/action_view/helpers/form_options_helper.rb
  14. 2  actionpack/lib/action_view/helpers/form_tag_helper.rb
  15. 2  actionpack/lib/action_view/helpers/number_helper.rb
  16. 2  actionpack/lib/action_view/helpers/text_helper.rb
  17. 4  actionpack/lib/action_view/helpers/translation_helper.rb
  18. 2  actionpack/lib/action_view/render/layouts.rb
  19. 2  activemodel/lib/active_model/attribute_methods.rb
  20. 2  activemodel/lib/active_model/errors.rb
  21. 2  activemodel/lib/active_model/translation.rb
  22. 4  activemodel/lib/active_model/validations.rb
  23. 2  activemodel/lib/active_model/validations/validates.rb
  24. 4  activemodel/lib/active_model/validator.rb
  25. 10  activerecord/lib/active_record/associations.rb
  26. 2  activerecord/lib/active_record/associations/through_association_scope.rb
  27. 2  activerecord/lib/active_record/autosave_association.rb
  28. 2  activerecord/lib/active_record/base.rb
  29. 2  activerecord/lib/active_record/nested_attributes.rb
  30. 8  activerecord/lib/active_record/reflection.rb
  31. 2  activerecord/lib/active_record/relation.rb
  32. 12  activerecord/lib/active_record/schema_dumper.rb
  33. 4  activeresource/lib/active_resource/base.rb
  34. 2  activesupport/lib/active_support/cache.rb
  35. 2  activesupport/lib/active_support/cache/memory_store.rb
  36. 2  activesupport/lib/active_support/core_ext/array/grouping.rb
  37. 2  activesupport/lib/active_support/core_ext/range/overlaps.rb
  38. 2  activesupport/lib/active_support/dependencies.rb
  39. 2  activesupport/lib/active_support/multibyte.rb
  40. 2  activesupport/lib/active_support/notifications.rb
  41. 2  activesupport/lib/active_support/time_with_zone.rb
  42. 2  activesupport/lib/active_support/values/time_zone.rb
8  actionmailer/lib/action_mailer/base.rb
@@ -60,21 +60,21 @@ module ActionMailer #:nodoc:
60 60
   #
61 61
   # If you want to explicitly render only certain templates, pass a block:
62 62
   #
63  
-  #   mail(:to => user.emai) do |format|
  63
+  #   mail(:to => user.email) do |format|
64 64
   #     format.text
65 65
   #     format.html
66 66
   #   end
67 67
   #
68 68
   # The block syntax is useful if also need to specify information specific to a part:
69 69
   #
70  
-  #   mail(:to => user.emai) do |format|
  70
+  #   mail(:to => user.email) do |format|
71 71
   #     format.text(:content_transfer_encoding => "base64")
72 72
   #     format.html
73 73
   #   end
74 74
   #
75 75
   # Or even to render a special view:
76 76
   #
77  
-  #   mail(:to => user.emai) do |format|
  77
+  #   mail(:to => user.email) do |format|
78 78
   #     format.text
79 79
   #     format.html { render "some_other_template" }
80 80
   #   end
@@ -182,7 +182,7 @@ module ActionMailer #:nodoc:
182 182
   #   end
183 183
   #
184 184
   # Which will (if it had both a <tt>welcome.text.plain.erb</tt> and <tt>welcome.text.html.erb</tt>
185  
-  # tempalte in the view directory), send a complete <tt>multipart/mixed</tt> email with two parts,
  185
+  # template in the view directory), send a complete <tt>multipart/mixed</tt> email with two parts,
186 186
   # the first part being a <tt>multipart/alternative</tt> with the text and HTML email parts inside,
187 187
   # and the second being a <tt>application/pdf</tt> with a Base64 encoded copy of the file.pdf book
188 188
   # with the filename +free_book.pdf+.
2  actionmailer/lib/action_mailer/deprecated_api.rb
... ...
@@ -1,7 +1,7 @@
1 1
 module ActionMailer
2 2
   # This is the API which is deprecated and is going to be removed on Rails 3.1 release.
3 3
   # Part of the old API will be deprecated after 3.1, for a smoother deprecation process.
4  
-  # Chech those in OldApi instead.
  4
+  # Check those in OldApi instead.
5 5
   module DeprecatedApi #:nodoc:
6 6
     extend ActiveSupport::Concern
7 7
 
2  actionpack/lib/abstract_controller/base.rb
@@ -26,7 +26,7 @@ def inherited(klass)
26 26
         super
27 27
       end
28 28
 
29  
-      # A list of all descendents of AbstractController::Base. This is
  29
+      # A list of all descendants of AbstractController::Base. This is
30 30
       # useful for initializers which need to add behavior to all controllers.
31 31
       def descendants
32 32
         @descendants ||= []
2  actionpack/lib/action_controller/metal/request_forgery_protection.rb
@@ -55,7 +55,7 @@ module RequestForgeryProtection
55 55
       config_accessor :request_forgery_protection_token
56 56
       self.request_forgery_protection_token ||= :authenticity_token
57 57
 
58  
-      # Controls whether request forgergy protection is turned on or not. Turned off by default only in test mode.
  58
+      # Controls whether request forgery protection is turned on or not. Turned off by default only in test mode.
59 59
       config_accessor :allow_forgery_protection
60 60
       self.allow_forgery_protection = true if allow_forgery_protection.nil?
61 61
 
4  actionpack/lib/action_controller/test_case.rb
@@ -188,7 +188,7 @@ def initialize(session = {})
188 188
   # Superclass for ActionController functional tests. Functional tests allow you to
189 189
   # test a single controller action per test method. This should not be confused with
190 190
   # integration tests (see ActionController::IntegrationTest), which are more like
191  
-  # "stories" that can involve multiple controllers and mutliple actions (i.e. multiple
  191
+  # "stories" that can involve multiple controllers and multiple actions (i.e. multiple
192 192
   # different HTTP requests).
193 193
   #
194 194
   # == Basic example
@@ -442,7 +442,7 @@ def build_request_uri(action, parameters)
442 442
     end
443 443
 
444 444
     # When the request.remote_addr remains the default for testing, which is 0.0.0.0, the exception is simply raised inline
445  
-    # (bystepping the regular exception handling from rescue_action). If the request.remote_addr is anything else, the regular
  445
+    # (skipping the regular exception handling from rescue_action). If the request.remote_addr is anything else, the regular
446 446
     # rescue_action process takes place. This means you can test your rescue_action code by setting remote_addr to something else
447 447
     # than 0.0.0.0.
448 448
     #
2  actionpack/lib/action_dispatch/http/mime_type.rb
@@ -60,7 +60,7 @@ class AcceptItem #:nodoc:
60 60
       def initialize(order, name, q=nil)
61 61
         @order = order
62 62
         @name = name.strip
63  
-        q ||= 0.0 if @name == Mime::ALL # default wilcard match to end of list
  63
+        q ||= 0.0 if @name == Mime::ALL # default wildcard match to end of list
64 64
         @q = ((q || 1.0).to_f * 100).to_i
65 65
       end
66 66
 
2  actionpack/lib/action_dispatch/http/parameters.rb
@@ -32,7 +32,7 @@ def path_parameters
32 32
       end
33 33
 
34 34
     private
35  
-      # Convert nested Hashs to HashWithIndifferentAccess
  35
+      # Convert nested Hash to HashWithIndifferentAccess
36 36
       def normalize_parameters(value)
37 37
         case value
38 38
         when Hash
4  actionpack/lib/action_dispatch/http/upload.rb
@@ -31,8 +31,8 @@ def original_filename
31 31
     end
32 32
 
33 33
     module Upload
34  
-      # Convert nested Hashs to HashWithIndifferentAccess and replace
35  
-      # file upload hashs with UploadedFile objects
  34
+      # Convert nested Hash to HashWithIndifferentAccess and replace
  35
+      # file upload hash with UploadedFile objects
36 36
       def normalize_parameters(value)
37 37
         if Hash === value && value.has_key?(:tempfile)
38 38
           upload = value[:tempfile]
2  actionpack/lib/action_dispatch/middleware/stack.rb
@@ -70,7 +70,7 @@ def use(*args, &block)
70 70
     end
71 71
 
72 72
     def active
73  
-      ActiveSupport::Deprecation.warn "All middlewares in the chaing are active since the laziness " << 
  73
+      ActiveSupport::Deprecation.warn "All middlewares in the chain are active since the laziness " << 
74 74
         "was removed from the middleware stack", caller
75 75
     end
76 76
 
2  actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -359,7 +359,7 @@ def count_description(min, max, count) #:nodoc:
359 359
       # position. Possible values are <tt>:top</tt>, <tt>:bottom</tt>, <tt>:before</tt>
360 360
       # and <tt>:after</tt>.
361 361
       #
362  
-      # Use the argument <tt>:redirect</tt> follwed by a path to check that an statement
  362
+      # Use the argument <tt>:redirect</tt> followed by a path to check that an statement
363 363
       # which redirects to the specified path is generated.
364 364
       #
365 365
       # Using the <tt>:remove</tt> statement, you will be able to pass a block, but it will
4  actionpack/lib/action_dispatch/testing/test_response.rb
@@ -53,7 +53,7 @@ def redirect_url_match?(pattern)
53 53
       # Returns the template of the file which was used to
54 54
       # render this response (or nil)
55 55
       def rendered
56  
-        ActiveSupport::Deprecation.warn("response.rendered has been deprecated. Use tempate.rendered instead", caller)
  56
+        ActiveSupport::Deprecation.warn("response.rendered has been deprecated. Use template.rendered instead", caller)
57 57
         @template.instance_variable_get(:@_rendered)
58 58
       end
59 59
 
@@ -89,7 +89,7 @@ def has_session_object?(name=nil)
89 89
 
90 90
       # A shortcut to the template.assigns
91 91
       def template_objects
92  
-        ActiveSupport::Deprecation.warn("response.template_objects has been deprecated. Use tempate.assigns instead", caller)
  92
+        ActiveSupport::Deprecation.warn("response.template_objects has been deprecated. Use template.assigns instead", caller)
93 93
         @template.assigns || {}
94 94
       end
95 95
 
6  actionpack/lib/action_view/helpers/form_helper.rb
@@ -92,7 +92,7 @@ module Helpers
92 92
     #     # error handling
93 93
     #   end
94 94
     #
95  
-    # That's how you tipically work with resources.
  95
+    # That's how you typically work with resources.
96 96
     module FormHelper
97 97
       extend ActiveSupport::Concern
98 98
 
@@ -269,7 +269,7 @@ module FormHelper
269 269
       # <tt>labelling_form</tt>.
270 270
       #
271 271
       # The custom FormBuilder class is automatically merged with the options
272  
-      # of a nested fields_for call, unless it's explicitely set.
  272
+      # of a nested fields_for call, unless it's explicitly set.
273 273
       #
274 274
       # In many cases you will want to wrap the above in another helper, so you
275 275
       # could do something like the following:
@@ -717,7 +717,7 @@ def text_area(object_name, method, options = {})
717 717
       #
718 718
       # To prevent this the helper generates an auxiliary hidden field before
719 719
       # the very check box. The hidden field has the same name and its
720  
-      # attributes mimick an unchecked check box.
  720
+      # attributes mimic an unchecked check box.
721 721
       #
722 722
       # This way, the client either sends only the hidden field (representing
723 723
       # the check box is unchecked), or both fields. Since the HTML specification
4  actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -412,8 +412,8 @@ def option_groups_from_collection_for_select(collection, group_method, group_lab
412 412
       # * +selected_key+ - A value equal to the +value+ attribute for one of the <tt><option></tt> tags,
413 413
       #   which will have the +selected+ attribute set. Note: It is possible for this value to match multiple options
414 414
       #   as you might have the same option in multiple groups.  Each will then get <tt>selected="selected"</tt>.
415  
-      # * +prompt+ - set to true or a prompt string. When the select element doesn’t have a value yet, this
416  
-      #   prepends an option with a generic prompt — "Please select" — or the given prompt string.
  415
+      # * +prompt+ - set to true or a prompt string. When the select element doesn't have a value yet, this
  416
+      #   prepends an option with a generic prompt - "Please select" - or the given prompt string.
417 417
       #
418 418
       # Sample usage (Array):
419 419
       #   grouped_options = [
2  actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -535,7 +535,7 @@ def html_options_for_form(url_for_options, options, *parameters_for_url)
535 535
 
536 536
         def extra_tags_for_form(html_options)
537 537
           case method = html_options.delete("method").to_s
538  
-            when /^get$/i # must be case-insentive, but can't use downcase as might be nil
  538
+            when /^get$/i # must be case-insensitive, but can't use downcase as might be nil
539 539
               html_options["method"] = "get"
540 540
               ''
541 541
             when /^post$/i, "", nil
2  actionpack/lib/action_view/helpers/number_helper.rb
@@ -325,7 +325,7 @@ def number_with_precision(number, *args)
325 325
       #  number_to_human_size(483989, :precision => 2)                      # => 470 KB
326 326
       #  number_to_human_size(1234567, :precision => 2, :separator => ',')  # => 1,2 MB
327 327
       #
328  
-      # Unsignificant zeros after the fractional separator are stripped out by default (set
  328
+      # Non-significant zeros after the fractional separator are stripped out by default (set
329 329
       # <tt>:strip_insignificant_zeros</tt> to +false+ to change that):
330 330
       #  number_to_human_size(1234567890123, :precision => 5)        # => "1.1229 TB"
331 331
       #  number_to_human_size(524288000, :precision=>5)              # => "500 MB"
2  actionpack/lib/action_view/helpers/text_helper.rb
@@ -48,7 +48,7 @@ def safe_concat(string)
48 48
       #   truncate("Once upon a time in a world far far away", :length => 17)
49 49
       #   # => "Once upon a ti..."
50 50
       #
51  
-      #   truncate("Once upon a time in a world far far away", :lenght => 17, :separator => ' ')
  51
+      #   truncate("Once upon a time in a world far far away", :length => 17, :separator => ' ')
52 52
       #   # => "Once upon a..."
53 53
       #
54 54
       #   truncate("And they found that many people were sleeping better.", :length => 25, :omission => '... (continued)')
4  actionpack/lib/action_view/helpers/translation_helper.rb
@@ -11,8 +11,8 @@ module TranslationHelper
11 11
       # to translate many keys within the same partials and gives you a simple framework for scoping them consistently. If you don't
12 12
       # prepend the key with a period, nothing is converted.
13 13
       #
14  
-      # Third, it’ll mark the translation as safe HTML if the key has the suffix "_html" or the last element of the key is the word
15  
-      # "html". For example, calling translate("footer_html") or translate("footer.html") will return a safe HTML string that won’t
  14
+      # Third, it'll mark the translation as safe HTML if the key has the suffix "_html" or the last element of the key is the word
  15
+      # "html". For example, calling translate("footer_html") or translate("footer.html") will return a safe HTML string that won't
16 16
       # be escaped by other HTML helper methods. This naming convention helps to identify translations that include HTML tags so that
17 17
       # you know what kind of output to expect when you call translate in a template.
18 18
 
2  actionpack/lib/action_view/render/layouts.rb
@@ -55,7 +55,7 @@ def _layout_for(name = nil, &block) #:nodoc:
55 55
     end
56 56
 
57 57
     # This is the method which actually finds the layout using details in the lookup
58  
-    # context object. If no layout is found, it checkes if at least a layout with
  58
+    # context object. If no layout is found, it checks if at least a layout with
59 59
     # the given name exists across all details before raising the error.
60 60
     def find_layout(layout)
61 61
       begin
2  activemodel/lib/active_model/attribute_methods.rb
@@ -45,7 +45,7 @@ class MissingAttributeError < NoMethodError
45 45
   #     end
46 46
   #   end
47 47
   #
48  
-  # Please notice that whenever you include ActiveModel::AtributeMethods in your class,
  48
+  # Please notice that whenever you include ActiveModel::AttributeMethods in your class,
49 49
   # it requires you to implement a <tt>attributes</tt> methods which returns a hash with
50 50
   # each attribute name in your model as hash key and the attribute value as hash value.
51 51
   # Hash keys must be a string.
2  activemodel/lib/active_model/errors.rb
@@ -240,7 +240,7 @@ def full_messages
240 240
     # default message (e.g. <tt>activemodel.errors.messages.MESSAGE</tt>). The translated model name,
241 241
     # translated attribute name and the value are available for interpolation.
242 242
     #
243  
-    # When using inheritence in your models, it will check all the inherited models too, but only if the model itself
  243
+    # When using inheritance in your models, it will check all the inherited models too, but only if the model itself
244 244
     # hasn't been found. Say you have <tt>class Admin < User; end</tt> and you wanted the translation for the <tt>:blank</tt>
245 245
     # error +message+ for the <tt>title</tt> +attribute+, it looks for these translations:
246 246
     #
2  activemodel/lib/active_model/translation.rb
@@ -11,7 +11,7 @@ module ActiveModel
11 11
   #     extend ActiveModel::Translation
12 12
   #   end
13 13
   # 
14  
-  #   TranslatedPerson.human_attribute_name('my_attribue')
  14
+  #   TranslatedPerson.human_attribute_name('my_attribute')
15 15
   #   #=> "My attribute"
16 16
   # 
17 17
   # This also provides the required class methods for hooking into the
4  activemodel/lib/active_model/validations.rb
@@ -89,7 +89,7 @@ def validates_each(*attr_names, &block)
89 89
       end
90 90
 
91 91
       # Adds a validation method or block to the class. This is useful when
92  
-      # overriding the +validate+ instance method becomes too unwieldly and
  92
+      # overriding the +validate+ instance method becomes too unwieldy and
93 93
       # you're looking for more descriptive declaration of your validations.
94 94
       #
95 95
       # This can be done with a symbol pointing to a method:
@@ -172,7 +172,7 @@ def invalid?(context = nil)
172 172
       !valid?(context)
173 173
     end
174 174
 
175  
-    # Hook method defining how an attribute value should be retieved. By default this is assumed
  175
+    # Hook method defining how an attribute value should be retrieved. By default this is assumed
176 176
     # to be an instance named after the attribute. Override this method in subclasses should you
177 177
     # need to retrieve the value for a given attribute differently e.g.
178 178
     #   class MyClass
2  activemodel/lib/active_model/validations/validates.rb
@@ -20,7 +20,7 @@ module ClassMethods
20 20
       #   validates :username, :presence => true
21 21
       #   validates :username, :uniqueness => true
22 22
       # 
23  
-      # The power of the +validates+ method comes when using cusom validators
  23
+      # The power of the +validates+ method comes when using custom validators
24 24
       # and default validators in one call for a given attribute e.g.
25 25
       #
26 26
       #   class EmailValidator < ActiveModel::EachValidator
4  activemodel/lib/active_model/validator.rb
@@ -106,7 +106,7 @@ def self.kind
106 106
       @kind ||= name.split('::').last.underscore.sub(/_validator$/, '').to_sym unless anonymous?
107 107
     end
108 108
 
109  
-    # Accepts options that will be made availible through the +options+ reader.
  109
+    # Accepts options that will be made available through the +options+ reader.
110 110
     def initialize(options)
111 111
       @options = options
112 112
     end
@@ -152,7 +152,7 @@ def validate(record)
152 152
       end
153 153
     end
154 154
 
155  
-    # Override this method in subclasses with the validation logic, adding
  155
+    # Override this method in subclasses with the validation logic, adding
156 156
     # errors to the records +errors+ array where necessary.
157 157
     def validate_each(record, attribute, value)
158 158
       raise NotImplementedError
10  activerecord/lib/active_record/associations.rb
@@ -88,8 +88,8 @@ def initialize(reflection)
88 88
     end
89 89
   end
90 90
 
91  
-  # This error is raised when trying to destroy a parent instance in a N:1, 1:1 assosications
92  
-  # (has_many, has_one) when there is at least 1 child assosociated instance.
  91
+  # This error is raised when trying to destroy a parent instance in a N:1, 1:1 associations
  92
+  # (has_many, has_one) when there is at least 1 child associated instance.
93 93
   # ex: if @project.tasks.size > 0, DeleteRestrictionError will be raised when trying to destroy @project
94 94
   class DeleteRestrictionError < ActiveRecordError #:nodoc:
95 95
     def initialize(reflection)
@@ -890,7 +890,7 @@ module ClassMethods
890 890
       # [:inverse_of]
891 891
       #   Specifies the name of the <tt>belongs_to</tt> association on the associated object that is the inverse of this <tt>has_many</tt>
892 892
       #   association.  Does not work in combination with <tt>:through</tt> or <tt>:as</tt> options.
893  
-      #   See ActiveRecord::Associations::ClassMethods's overview on Bi-directional assocations for more detail.
  893
+      #   See ActiveRecord::Associations::ClassMethods's overview on Bi-directional associations for more detail.
894 894
       #
895 895
       # Option examples:
896 896
       #   has_many :comments, :order => "posted_on"
@@ -1005,7 +1005,7 @@ def has_many(association_id, options = {}, &extension)
1005 1005
       # [:inverse_of]
1006 1006
       #   Specifies the name of the <tt>belongs_to</tt> association on the associated object that is the inverse of this <tt>has_one</tt>
1007 1007
       #   association.  Does not work in combination with <tt>:through</tt> or <tt>:as</tt> options.
1008  
-      #   See ActiveRecord::Associations::ClassMethods's overview on Bi-directional assocations for more detail.
  1008
+      #   See ActiveRecord::Associations::ClassMethods's overview on Bi-directional associations for more detail.
1009 1009
       #
1010 1010
       # Option examples:
1011 1011
       #   has_one :credit_card, :dependent => :destroy  # destroys the associated credit card
@@ -1110,7 +1110,7 @@ def has_one(association_id, options = {})
1110 1110
       # [:inverse_of]
1111 1111
       #   Specifies the name of the <tt>has_one</tt> or <tt>has_many</tt> association on the associated object that is the inverse of this <tt>belongs_to</tt>
1112 1112
       #   association.  Does not work in combination with the <tt>:polymorphic</tt> options.
1113  
-      #   See ActiveRecord::Associations::ClassMethods's overview on Bi-directional assocations for more detail.
  1113
+      #   See ActiveRecord::Associations::ClassMethods's overview on Bi-directional associations for more detail.
1114 1114
       #
1115 1115
       # Option examples:
1116 1116
       #   belongs_to :firm, :foreign_key => "client_of"
2  activerecord/lib/active_record/associations/through_association_scope.rb
@@ -91,7 +91,7 @@ def construct_owner_attributes(reflection)
91 91
 
92 92
       # Construct attributes for :through pointing to owner and associate.
93 93
       def construct_join_attributes(associate)
94  
-        # TODO: revist this to allow it for deletion, supposing dependent option is supported
  94
+        # TODO: revisit this to allow it for deletion, supposing dependent option is supported
95 95
         raise ActiveRecord::HasManyThroughCantAssociateThroughHasOneOrManyReflection.new(@owner, @reflection) if [:has_one, :has_many].include?(@reflection.source_reflection.macro)
96 96
 
97 97
         join_attributes = construct_owner_attributes(@reflection.through_reflection).merge(@reflection.source_reflection.primary_key_name => associate.id)
2  activerecord/lib/active_record/autosave_association.rb
@@ -375,7 +375,7 @@ def save_belongs_to_association(reflection)
375 375
           if association.updated?
376 376
             association_id = association.send(reflection.options[:primary_key] || :id)
377 377
             self[reflection.primary_key_name] = association_id
378  
-            # TODO: Removing this code doesn't seem to matter
  378
+            # TODO: Removing this code doesn't seem to matter...
379 379
             if reflection.options[:polymorphic]
380 380
               self[reflection.options[:foreign_type]] = association.class.base_class.name.to_s
381 381
             end
2  activerecord/lib/active_record/base.rb
@@ -1456,7 +1456,7 @@ def initialize_copy(other)
1456 1456
         # For example in the test suite the topic model's after_initialize method sets the author_email_address to
1457 1457
         # test@test.com. I would have thought this would mean that all cloned models would have an author email address
1458 1458
         # of test@test.com. However the test_clone test method seems to test that this is not the case. As a result the
1459  
-        # after_initialize callback has to be run *before* the copying of the atrributes rather than afterwards in order
  1459
+        # after_initialize callback has to be run *before* the copying of the attributes rather than afterwards in order
1460 1460
         # for all tests to pass. This makes no sense to me.
1461 1461
         callback(:after_initialize) if respond_to_without_attributes?(:after_initialize)
1462 1462
         cloned_attributes = other.clone_attributes(:read_attribute_before_type_cast)
2  activerecord/lib/active_record/nested_attributes.rb
@@ -278,7 +278,7 @@ def _destroy
278 278
     # Assigns the given attributes to the association.
279 279
     #
280 280
     # If update_only is false and the given attributes include an <tt>:id</tt>
281  
-    # that matches the existing records id, then the existing record will be
  281
+    # that matches the existing record's id, then the existing record will be
282 282
     # modified. If update_only is true, a new record is only created when no
283 283
     # object exists. Otherwise a new record will be built.
284 284
     #
8  activerecord/lib/active_record/reflection.rb
@@ -165,14 +165,14 @@ def build_association(*options)
165 165
         klass.new(*options)
166 166
       end
167 167
 
168  
-      # Creates a new instance of the associated class, and immediates saves it
  168
+      # Creates a new instance of the associated class, and immediately saves it
169 169
       # with ActiveRecord::Base#save. +options+ will be passed to the class's
170 170
       # creation method. Returns the newly created object.
171 171
       def create_association(*options)
172 172
         klass.create(*options)
173 173
       end
174 174
 
175  
-      # Creates a new instance of the associated class, and immediates saves it
  175
+      # Creates a new instance of the associated class, and immediately saves it
176 176
       # with ActiveRecord::Base#save!. +options+ will be passed to the class's
177 177
       # creation method. If the created record doesn't pass validations, then an
178 178
       # exception will be raised.
@@ -267,10 +267,10 @@ def collection?
267 267
       # Returns whether or not the association should be validated as part of
268 268
       # the parent's validation.
269 269
       #
270  
-      # Unless you explicitely disable validation with
  270
+      # Unless you explicitly disable validation with
271 271
       # <tt>:validate => false</tt>, it will take place when:
272 272
       #
273  
-      # * you explicitely enable validation; <tt>:validate => true</tt>
  273
+      # * you explicitly enable validation; <tt>:validate => true</tt>
274 274
       # * you use autosave; <tt>:autosave => true</tt>
275 275
       # * the association is a +has_many+ association
276 276
       def validate?
2  activerecord/lib/active_record/relation.rb
@@ -67,7 +67,7 @@ def to_a
67 67
       preload +=  @includes_values unless eager_loading?
68 68
       preload.each {|associations| @klass.send(:preload_associations, @records, associations) }
69 69
 
70  
-      # @readonly_value is true only if set explicity. @implicit_readonly is true if there are JOINS and no explicit SELECT.
  70
+      # @readonly_value is true only if set explicitly. @implicit_readonly is true if there are JOINS and no explicit SELECT.
71 71
       readonly = @readonly_value.nil? ? @implicit_readonly : @readonly_value
72 72
       @records.each { |record| record.readonly! } if readonly
73 73
 
12  activerecord/lib/active_record/schema_dumper.rb
@@ -173,15 +173,15 @@ def default_string(value)
173 173
       def indexes(table, stream)
174 174
         if (indexes = @connection.indexes(table)).any?
175 175
           add_index_statements = indexes.map do |index|
176  
-            statment_parts = [ ('add_index ' + index.table.inspect) ]
177  
-            statment_parts << index.columns.inspect
178  
-            statment_parts << (':name => ' + index.name.inspect)
179  
-            statment_parts << ':unique => true' if index.unique
  176
+            statement_parts = [ ('add_index ' + index.table.inspect) ]
  177
+            statement_parts << index.columns.inspect
  178
+            statement_parts << (':name => ' + index.name.inspect)
  179
+            statement_parts << ':unique => true' if index.unique
180 180
 
181 181
             index_lengths = index.lengths.compact if index.lengths.is_a?(Array)
182  
-            statment_parts << (':length => ' + Hash[*index.columns.zip(index.lengths).flatten].inspect) if index_lengths.present?
  182
+            statement_parts << (':length => ' + Hash[*index.columns.zip(index.lengths).flatten].inspect) if index_lengths.present?
183 183
 
184  
-            '  ' + statment_parts.join(', ')
  184
+            '  ' + statement_parts.join(', ')
185 185
           end
186 186
 
187 187
           stream.puts add_index_statements.sort.join("\n")
4  activeresource/lib/active_resource/base.rb
@@ -763,7 +763,7 @@ def create(attributes = {})
763 763
       #   With any other scope, find returns nil when no data is returned.
764 764
       #
765 765
       #   Person.find(1)
766  
-      #   # => raises ResourcenotFound
  766
+      #   # => raises ResourceNotFound
767 767
       #
768 768
       #   Person.find(:all)
769 769
       #   Person.find(:first)
@@ -941,7 +941,7 @@ def schema
941 941
     end
942 942
 
943 943
     # This is a list of known attributes for this resource. Either
944  
-    # gathered fromthe provided <tt>schema</tt>, or from the attributes
  944
+    # gathered from the provided <tt>schema</tt>, or from the attributes
945 945
     # set on this instance after it has been fetched from the remote system.
946 946
     def known_attributes
947 947
       self.class.known_attributes + self.attributes.keys.map(&:to_s)
2  activesupport/lib/active_support/cache.rb
@@ -22,7 +22,7 @@ module Cache
22 22
     EMPTY_OPTIONS = {}.freeze
23 23
 
24 24
     # These options mean something to all cache implementations. Individual cache
25  
-    # implementations may support additional optons.
  25
+    # implementations may support additional options.
26 26
     UNIVERSAL_OPTIONS = [:namespace, :compress, :compress_threshold, :expires_in, :race_condition_ttl]
27 27
 
28 28
     module Strategy
2  activesupport/lib/active_support/cache/memory_store.rb
@@ -10,7 +10,7 @@ module Cache
10 10
     # appropriate cache for you.
11 11
     #
12 12
     # This cache has a bounded size specified by the :size options to the
13  
-    # initializer (default is 32Mb). When the cache exceeds the alotted size,
  13
+    # initializer (default is 32Mb). When the cache exceeds the allotted size,
14 14
     # a cleanup will occur which tries to prune the cache down to three quarters
15 15
     # of the maximum size by removing the least recently used entries.
16 16
     #
2  activesupport/lib/active_support/core_ext/array/grouping.rb
@@ -55,7 +55,7 @@ def in_groups_of(number, fill_with = nil)
55 55
   #   ["6", "7"]
56 56
   def in_groups(number, fill_with = nil)
57 57
     # size / number gives minor group size;
58  
-    # size % number gives how many objects need extra accomodation;
  58
+    # size % number gives how many objects need extra accommodation;
59 59
     # each group hold either division or division + 1 items.
60 60
     division = size / number
61 61
     modulo = size % number
2  activesupport/lib/active_support/core_ext/range/overlaps.rb
... ...
@@ -1,5 +1,5 @@
1 1
 class Range
2  
-  # Compare two ranges and see if they overlap eachother
  2
+  # Compare two ranges and see if they overlap each other
3 3
   #  (1..5).overlaps?(4..6) # => true
4 4
   #  (1..5).overlaps?(7..9) # => false
5 5
   def overlaps?(other)
2  activesupport/lib/active_support/dependencies.rb
@@ -340,7 +340,7 @@ def qualified_const_defined?(path)
340 340
 
341 341
     if Module.method(:const_defined?).arity == 1
342 342
       # Does this module define this constant?
343  
-      # Wrapper to accomodate changing Module#const_defined? in Ruby 1.9
  343
+      # Wrapper to accommodate changing Module#const_defined? in Ruby 1.9
344 344
       def local_const_defined?(mod, const)
345 345
         mod.const_defined?(const)
346 346
       end
2  activesupport/lib/active_support/multibyte.rb
@@ -17,7 +17,7 @@ def self.proxy_class=(klass)
17 17
       @proxy_class = klass
18 18
     end
19 19
 
20  
-    # Returns the currect proxy class
  20
+    # Returns the current proxy class
21 21
     def self.proxy_class
22 22
       @proxy_class ||= ActiveSupport::Multibyte::Chars
23 23
     end
2  activesupport/lib/active_support/notifications.rb
@@ -23,7 +23,7 @@ module ActiveSupport
23 23
   #
24 24
   #   event = @events.first
25 25
   #   event.name      #=> :render
26  
-  #   event.duration  #=> 10 (in miliseconds)
  26
+  #   event.duration  #=> 10 (in milliseconds)
27 27
   #   event.result    #=> "Foo"
28 28
   #   event.payload   #=> { :extra => :information }
29 29
   #
2  activesupport/lib/active_support/time_with_zone.rb
@@ -18,7 +18,7 @@ module ActiveSupport
18 18
   #
19 19
   # See Time and TimeZone for further documentation of these methods.
20 20
   #
21  
-  # TimeWithZone instances implement the same API as Ruby Time instances, so that Time and TimeWithZone instances are interchangable. Examples:
  21
+  # TimeWithZone instances implement the same API as Ruby Time instances, so that Time and TimeWithZone instances are interchangeable. Examples:
22 22
   #
23 23
   #   t = Time.zone.now                     # => Sun, 18 May 2008 13:27:25 EDT -04:00
24 24
   #   t.hour                                # => 13
2  activesupport/lib/active_support/values/time_zone.rb
@@ -224,7 +224,7 @@ def formatted_offset(colon=true, alternate_utc_string = nil)
224 224
       utc_offset == 0 && alternate_utc_string || self.class.seconds_to_utc_offset(utc_offset, colon)
225 225
     end
226 226
 
227  
-    # Compare this time zone to the parameter. The two are comapred first on
  227
+    # Compare this time zone to the parameter. The two are compared first on
228 228
     # their offsets, and then by name.
229 229
     def <=>(zone)
230 230
       result = (utc_offset <=> zone.utc_offset)

0 notes on commit ccf9577

Please sign in to comment.
Something went wrong with that request. Please try again.