mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Spelling fixes in activerecord.
This commit is contained in:
parent
a97f3bdfa9
commit
d2e8cdea2c
9 changed files with 12 additions and 12 deletions
|
@ -33,7 +33,7 @@ end
|
|||
require 'active_support/core/all'
|
||||
|
||||
module ActiveRecord
|
||||
# TODO: Review explicit loads to see if they will automatically be handled by the initilizer.
|
||||
# TODO: Review explicit loads to see if they will automatically be handled by the initializer.
|
||||
def self.load_all!
|
||||
[Base, DynamicFinderMatch, ConnectionAdapters::AbstractAdapter]
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module ActiveRecord
|
|||
# 'books' table is useful; the joined 'authors' data is just redundant, and
|
||||
# processing this redundant data takes memory and CPU time. The problem
|
||||
# quickly becomes worse and worse as the level of eager loading increases
|
||||
# (i.e. if ActiveRecord is to eager load the associations' assocations as
|
||||
# (i.e. if ActiveRecord is to eager load the associations' associations as
|
||||
# well).
|
||||
#
|
||||
# The second strategy is to use multiple database queries, one for each
|
||||
|
@ -60,7 +60,7 @@ module ActiveRecord
|
|||
# +associations+ specifies one or more associations that you want to
|
||||
# preload. It may be:
|
||||
# - a Symbol or a String which specifies a single association name. For
|
||||
# example, specifiying +:books+ allows this method to preload all books
|
||||
# example, specifying +:books+ allows this method to preload all books
|
||||
# for an Author.
|
||||
# - an Array which specifies multiple association names. This array
|
||||
# is processed recursively. For example, specifying <tt>[:avatar, :books]</tt>
|
||||
|
|
|
@ -1192,7 +1192,7 @@ module ActiveRecord
|
|||
|
||||
private
|
||||
# Generates a join table name from two provided table names.
|
||||
# The names in the join table namesme end up in lexicographic order.
|
||||
# The names in the join table names end up in lexicographic order.
|
||||
#
|
||||
# join_table_name("members", "clubs") # => "clubs_members"
|
||||
# join_table_name("members", "special_clubs") # => "members_special_clubs"
|
||||
|
|
|
@ -11,7 +11,7 @@ module ActiveRecord
|
|||
# ones created with +build+ are added to the target. So, the target may be
|
||||
# non-empty and still lack children waiting to be read from the database.
|
||||
# If you look directly to the database you cannot assume that's the entire
|
||||
# collection because new records may have beed added to the target, etc.
|
||||
# collection because new records may have been added to the target, etc.
|
||||
#
|
||||
# If you need to work on all current children, new and existing records,
|
||||
# +load_target+ and the +loaded+ flag are your friends.
|
||||
|
@ -228,7 +228,7 @@ module ActiveRecord
|
|||
self
|
||||
end
|
||||
|
||||
# Destory all the records from this association.
|
||||
# Destroy all the records from this association.
|
||||
#
|
||||
# See destroy for more info.
|
||||
def destroy_all
|
||||
|
|
|
@ -1357,14 +1357,14 @@ module ActiveRecord #:nodoc:
|
|||
classes
|
||||
rescue
|
||||
# OPTIMIZE this rescue is to fix this test: ./test/cases/reflection_test.rb:56:in `test_human_name_for_column'
|
||||
# Appearantly the method base_class causes some trouble.
|
||||
# Apparently the method base_class causes some trouble.
|
||||
# It now works for sure.
|
||||
[self]
|
||||
end
|
||||
|
||||
# Transforms attribute key names into a more humane format, such as "First name" instead of "first_name". Example:
|
||||
# Person.human_attribute_name("first_name") # => "First name"
|
||||
# This used to be depricated in favor of humanize, but is now preferred, because it automatically uses the I18n
|
||||
# This used to be deprecated in favor of humanize, but is now preferred, because it automatically uses the I18n
|
||||
# module now.
|
||||
# Specify +options+ with additional translating options.
|
||||
def human_attribute_name(attribute_key_name, options = {})
|
||||
|
|
|
@ -360,7 +360,7 @@ module ActiveRecord
|
|||
def call(env)
|
||||
@app.call(env)
|
||||
ensure
|
||||
# Don't return connection (and peform implicit rollback) if
|
||||
# Don't return connection (and perform implicit rollback) if
|
||||
# this request is a part of integration test
|
||||
unless env.key?("rack.test")
|
||||
ActiveRecord::Base.clear_active_connections!
|
||||
|
|
|
@ -407,7 +407,7 @@ end
|
|||
# subdomain: $LABEL
|
||||
#
|
||||
# Also, sometimes (like when porting older join table fixtures) you'll need
|
||||
# to be able to get ahold of the identifier for a given label. ERB
|
||||
# to be able to get a hold of the identifier for a given label. ERB
|
||||
# to the rescue:
|
||||
#
|
||||
# george_reginald:
|
||||
|
|
|
@ -271,7 +271,7 @@ module ActiveRecord
|
|||
# })
|
||||
#
|
||||
# Will update the name of the Person with ID 1, build a new associated
|
||||
# person with the name `John', and mark the associatied Person with ID 2
|
||||
# person with the name `John', and mark the associated Person with ID 2
|
||||
# for destruction.
|
||||
#
|
||||
# Also accepts an Array of attribute hashes:
|
||||
|
|
|
@ -73,7 +73,7 @@ module ActiveRecord
|
|||
# default message (e.g. <tt>activerecord.errors.messages.MESSAGE</tt>). The translated model name,
|
||||
# translated attribute name and the value are available for interpolation.
|
||||
#
|
||||
# When using inheritence in your models, it will check all the inherited models too, but only if the model itself
|
||||
# When using inheritance in your models, it will check all the inherited models too, but only if the model itself
|
||||
# hasn't been found. Say you have <tt>class Admin < User; end</tt> and you wanted the translation for the <tt>:blank</tt>
|
||||
# error +message+ for the <tt>title</tt> +attribute+, it looks for these translations:
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue