diff options
Diffstat (limited to 'activerecord/lib')
11 files changed, 31 insertions, 31 deletions
diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index 82011018a2..6a82e53b03 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -94,7 +94,7 @@ module ActiveRecord # relational unique identifiers (such as primary keys). Normal ActiveRecord::Base classes are entity objects. # # It's also important to treat the value objects as immutable. Don't allow the Money object to have its amount changed after - # creation. Create a new money object with the new value instead. This is examplified by the Money#exchanged_to method that + # creation. Create a new money object with the new value instead. This is exemplified by the Money#exchanged_to method that # returns a new value object instead of changing its own values. Active Record won't persist value objects that have been # changed through other means than the writer method. # @@ -108,7 +108,7 @@ module ActiveRecord # <tt>composed_of :address</tt> would add <tt>address</tt> and <tt>address=(new_address)</tt>. # # Options are: - # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be infered + # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred # from the part id. So <tt>composed_of :address</tt> will by default be linked to the +Address+ class, but # if the real class name is +CompanyAddress+, you'll have to specify it with this option. # * <tt>:mapping</tt> - specifies a number of mapping arrays (attribute, parameter) that bind an attribute name diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index b9cae482aa..baa3f178f3 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -160,7 +160,7 @@ module ActiveRecord # * <tt>collection.find(id)</tt> - finds an associated object responding to the +id+ and that # meets the condition that it has to be associated with this object. # * <tt>collection.find_all(conditions = nil, orderings = nil, limit = nil, joins = nil)</tt> - finds all associated objects responding - # criterias mentioned (like in the standard find_all) and that meets the condition that it has to be associated with this object. + # criteria mentioned (like in the standard find_all) and that meets the condition that it has to be associated with this object. # * <tt>collection.build(attributes = {})</tt> - returns a new object of the collection type that has been instantiated # with +attributes+ and linked to this object through a foreign key but has not yet been saved. # * <tt>collection.create(attributes = {})</tt> - returns a new object of the collection type that has been instantiated @@ -180,7 +180,7 @@ module ActiveRecord # The declaration can also include an options hash to specialize the behavior of the association. # # Options are: - # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be infered + # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_many :products</tt> will by default be linked to the +Product+ class, but # if the real class name is +SpecialProduct+, you'll have to specify it with this option. # * <tt>:conditions</tt> - specify the conditions that the associated objects must meet in order to be included as a "WHERE" @@ -263,7 +263,7 @@ module ActiveRecord # The declaration can also include an options hash to specialize the behavior of the association. # # Options are: - # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be infered + # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_one :manager</tt> will by default be linked to the +Manager+ class, but # if the real class name is +Person+, you'll have to specify it with this option. # * <tt>:conditions</tt> - specify the conditions that the associated object must meet in order to be included as a "WHERE" @@ -330,7 +330,7 @@ module ActiveRecord # The declaration can also include an options hash to specialize the behavior of the association. # # Options are: - # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be infered + # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_one :author</tt> will by default be linked to the +Author+ class, but # if the real class name is +Person+, you'll have to specify it with this option. # * <tt>:conditions</tt> - specify the conditions that the associated object must meet in order to be included as a "WHERE" @@ -432,7 +432,7 @@ module ActiveRecord # The declaration may include an options hash to specialize the behavior of the association. # # Options are: - # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be infered + # * <tt>:class_name</tt> - specify the class name of the association. Use it only if that name can't be inferred # from the association name. So <tt>has_and_belongs_to_many :projects</tt> will by default be linked to the # +Project+ class, but if the real class name is +SuperProject+, you'll have to specify it with this option. # * <tt>:join_table</tt> - specify the name of the join table if the default based on lexical order isn't what you want. diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index cf1d0ecefc..1eac8a2a0b 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -99,7 +99,7 @@ module ActiveRecord false end - # Array#flatten has problems with rescursive arrays. Going one level deeper solves the majority of the problems. + # Array#flatten has problems with recursive arrays. Going one level deeper solves the majority of the problems. def flatten_deeper(array) array.collect { |element| element.respond_to?(:flatten) ? element.flatten : element }.flatten end diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 3342fc7092..e763eb381c 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -112,7 +112,7 @@ module ActiveRecord #:nodoc: # is actually Payment.find_all_by_amount(amount, orderings = nil, limit = nil, joins = nil). And the full interface to Person.find_by_user_name is # actually Person.find_by_user_name(user_name, orderings = nil) # - # == Saving arrays, hashes, and other non-mappeable objects in text columns + # == Saving arrays, hashes, and other non-mappable objects in text columns # # Active Record can serialize any object in text columns using YAML. To do so, you must specify this with a call to the class method +serialize+. # This makes it possible to store arrays, hashes, and other non-mappeable objects without doing any additional work. Example: @@ -168,7 +168,7 @@ module ActiveRecord #:nodoc: # * +ActiveRecordError+ -- generic error class and superclass of all other errors raised by Active Record # * +AdapterNotSpecified+ -- the configuration hash used in <tt>establish_connection</tt> didn't include a # <tt>:adapter</tt> key. - # * +AdapterNotSpecified+ -- the <tt>:adapter</tt> key used in <tt>establish_connection</tt> specified an unexisting adapter + # * +AdapterNotSpecified+ -- the <tt>:adapter</tt> key used in <tt>establish_connection</tt> specified an non-existent adapter # (or a bad spelling of an existing one). # * +AssociationTypeMismatch+ -- the object assigned to the association wasn't of the type specified in the association definition. # * +SerializationTypeMismatch+ -- the object serialized wasn't of the class specified as the second parameter. @@ -221,7 +221,7 @@ module ActiveRecord #:nodoc: @@primary_key_prefix_type = nil # Accessor for the name of the prefix string to prepend to every table name. So if set to "basecamp_", all - # table names will be named like "basecamp_projects", "basecamp_people", etc. This is a convinient way of creating a namespace + # table names will be named like "basecamp_projects", "basecamp_people", etc. This is a convenient way of creating a namespace # for tables in a shared database. By default, the prefix is the empty string. cattr_accessor :table_name_prefix @@table_name_prefix = "" @@ -447,7 +447,7 @@ module ActiveRecord #:nodoc: write_inheritable_array("attr_protected", attributes) end - # Returns an array of all the attributes that have been protected from mass-assigment. + # Returns an array of all the attributes that have been protected from mass-assignment. def protected_attributes # :nodoc: read_inheritable_attribute("attr_protected") end @@ -460,14 +460,14 @@ module ActiveRecord #:nodoc: write_inheritable_array("attr_accessible", attributes) end - # Returns an array of all the attributes that have been made accessible to mass-assigment. + # Returns an array of all the attributes that have been made accessible to mass-assignment. def accessible_attributes # :nodoc: read_inheritable_attribute("attr_accessible") end # Specifies that the attribute by the name of +attr_name+ should be serialized before saving to the database and unserialized # after loading from the database. The serialization is done through YAML. If +class_name+ is specified, the serialized - # object must be of that class on retrival or +SerializationTypeMismatch+ will be raised. + # object must be of that class on retrieval or +SerializationTypeMismatch+ will be raised. def serialize(attr_name, class_name = Object) write_inheritable_attribute("attr_serialized", serialized_attributes.update(attr_name.to_s => class_name)) end @@ -507,7 +507,7 @@ module ActiveRecord #:nodoc: table_name_prefix + undecorated_table_name(class_name_of_active_record_descendant(self)) + table_name_suffix end - # Defines the primary key field -- can be overridden in subclasses. Overwritting will negate any effect of the + # Defines the primary key field -- can be overridden in subclasses. Overwriting will negate any effect of the # primary_key_prefix_type setting, though. def primary_key case primary_key_prefix_type @@ -1170,7 +1170,7 @@ module ActiveRecord #:nodoc: # by calling new on the column type or aggregation type (through composed_of) object with these parameters. # So having the pairs written_on(1) = "2004", written_on(2) = "6", written_on(3) = "24", will instantiate # written_on (a date type) with Date.new("2004", "6", "24"). You can also specify a typecast character in the - # parenteses to have the parameters typecasted before they're used in the constructor. Use i for Fixnum, f for Float, + # parentheses to have the parameters typecasted before they're used in the constructor. Use i for Fixnum, f for Float, # s for String, and a for Array. If all the values for a given attribute is empty, the attribute will be set to nil. def assign_multiparameter_attributes(pairs) execute_callstack_for_multiparameter_attributes( @@ -1253,4 +1253,4 @@ module ActiveRecord #:nodoc: string[0..3] == "--- " end end -end +end
\ No newline at end of file diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index b70d27f413..1346000d00 100755 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -22,7 +22,7 @@ module ActiveRecord # * (9) after_save # # That's a total of nine callbacks, which gives you immense power to react and prepare for each state in the - # Active Record lifecyle. + # Active Record lifecycle. # # Examples: # class CreditCard < ActiveRecord::Base @@ -125,7 +125,7 @@ module ActiveRecord # end # # def decrypt(value) - # # Secrecy is unvieled + # # Secrecy is unveiled # end # end # diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index a2bab29b42..6a9ca8fcf1 100755 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -326,7 +326,7 @@ module ActiveRecord # Commits the transaction (and turns on auto-committing). def commit_db_transaction() end - # Rollsback the transaction (and turns on auto-committing). Must be done if the transaction block + # Rolls back the transaction (and turns on auto-committing). Must be done if the transaction block # raises an exception or returns false. def rollback_db_transaction() end diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index d01085c395..b4c9323b80 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -23,7 +23,7 @@ require 'active_record/connection_adapters/abstract_adapter' # with User Id replaced with your proper login, and Password with your # password. # -# I have tested this code on a WindowsXP Pro SP1 system, +# I have tested this code on a Windows XP Pro SP1 system, # ruby 1.8.2 (2004-07-29) [i386-mswin32], SQL Server 2000. # module ActiveRecord @@ -122,7 +122,7 @@ EOL execute enable_identity_insert(table_name, true) ii_enabled = true rescue Exception => e - # Coulnd't turn on IDENTITY_INSERT + # Couldn't turn on IDENTITY_INSERT end end end @@ -285,4 +285,4 @@ EOL end end end -end
\ No newline at end of file +end diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 2e356cd8fb..9cbcf1c786 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -39,7 +39,7 @@ require 'active_record/support/inflector' # Fixtures can also be kept in the Comma Separated Value format. Akin to YAML fixtures, CSV fixtures are stored # in a single file, but, instead end with the .csv file extension (Rails example: "<your-rails-app>/test/fixtures/web_sites.csv") # -# The format of this tye of fixture file is much more compact than the others, but also a little harder to read by us +# The format of this type of fixture file is much more compact than the others, but also a little harder to read by us # humans. The first line of the CSV file is a comma-separated list of field names. The rest of the file is then comprised # of the actual data (1 per line). Here's an example: # diff --git a/activerecord/lib/active_record/transactions.rb b/activerecord/lib/active_record/transactions.rb index 3deaef6866..937955dd72 100644 --- a/activerecord/lib/active_record/transactions.rb +++ b/activerecord/lib/active_record/transactions.rb @@ -20,7 +20,7 @@ module ActiveRecord end # Transactions are protective blocks where SQL statements are only permanent if they can all succeed as one atomic action. - # The classic example is a transfer between two accounts where you can only have a deposit if the withdrawal succedded and + # The classic example is a transfer between two accounts where you can only have a deposit if the withdrawal succeeded and # vice versa. Transaction enforce the integrity of the database and guards the data against program errors or database break-downs. # So basically you should use transaction blocks whenever you have a number of statements that must be executed together or # not at all. Example: @@ -121,4 +121,4 @@ module ActiveRecord transaction { save_without_transactions(perform_validation) } end end -end
\ No newline at end of file +end diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 4d1c92330b..1e5d4287b0 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -19,7 +19,7 @@ module ActiveRecord # end # # def validate_on_update - # errors.add_to_base("No changes have occured") if unchanged_attributes? + # errors.add_to_base("No changes have occurred") if unchanged_attributes? # end # end # @@ -253,7 +253,7 @@ module ActiveRecord # # Configuration options: # * <tt>in</tt> - An enumerable object of available items - # * <tt>message</tt> - Specifieds a customer error message (default is: "is not included in the list") + # * <tt>message</tt> - Specifies a customer error message (default is: "is not included in the list") # * <tt>allow_nil</tt> - If set to true, skips this validation if the attribute is null (default is: false) def validates_inclusion_of(*attr_names) configuration = { :message => ActiveRecord::Errors.default_error_messages[:inclusion], :on => :save } @@ -272,7 +272,7 @@ module ActiveRecord end end - # Validates whether the associated object or objects are all themselves valid. Works with any kind of assocation. + # Validates whether the associated object or objects are all themselves valid. Works with any kind of association. # # class Book < ActiveRecord::Base # has_many :pages diff --git a/activerecord/lib/active_record/wrappings.rb b/activerecord/lib/active_record/wrappings.rb index 43e5e3151d..01976417b7 100644 --- a/activerecord/lib/active_record/wrappings.rb +++ b/activerecord/lib/active_record/wrappings.rb @@ -1,7 +1,7 @@ module ActiveRecord # A plugin framework for wrapping attribute values before they go in and unwrapping them after they go out of the database. # This was intended primarily for YAML wrapping of arrays and hashes, but this behavior is now native in the Base class. - # So for now this framework is laying dorment until a need pops up. + # So for now this framework is laying dormant until a need pops up. module Wrappings #:nodoc: module ClassMethods #:nodoc: def wrap_with(wrapper, *attributes) @@ -56,4 +56,4 @@ module ActiveRecord def unwrap(attribute) end end end -end
\ No newline at end of file +end |