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'
|
require 'active_support/core/all'
|
||||||
|
|
||||||
module ActiveRecord
|
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!
|
def self.load_all!
|
||||||
[Base, DynamicFinderMatch, ConnectionAdapters::AbstractAdapter]
|
[Base, DynamicFinderMatch, ConnectionAdapters::AbstractAdapter]
|
||||||
end
|
end
|
||||||
|
|
|
@ -30,7 +30,7 @@ module ActiveRecord
|
||||||
# 'books' table is useful; the joined 'authors' data is just redundant, and
|
# 'books' table is useful; the joined 'authors' data is just redundant, and
|
||||||
# processing this redundant data takes memory and CPU time. The problem
|
# processing this redundant data takes memory and CPU time. The problem
|
||||||
# quickly becomes worse and worse as the level of eager loading increases
|
# 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).
|
# well).
|
||||||
#
|
#
|
||||||
# The second strategy is to use multiple database queries, one for each
|
# 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
|
# +associations+ specifies one or more associations that you want to
|
||||||
# preload. It may be:
|
# preload. It may be:
|
||||||
# - a Symbol or a String which specifies a single association name. For
|
# - 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.
|
# for an Author.
|
||||||
# - an Array which specifies multiple association names. This array
|
# - an Array which specifies multiple association names. This array
|
||||||
# is processed recursively. For example, specifying <tt>[:avatar, :books]</tt>
|
# is processed recursively. For example, specifying <tt>[:avatar, :books]</tt>
|
||||||
|
|
|
@ -1192,7 +1192,7 @@ module ActiveRecord
|
||||||
|
|
||||||
private
|
private
|
||||||
# Generates a join table name from two provided table names.
|
# 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", "clubs") # => "clubs_members"
|
||||||
# join_table_name("members", "special_clubs") # => "members_special_clubs"
|
# 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
|
# 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.
|
# 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
|
# 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,
|
# If you need to work on all current children, new and existing records,
|
||||||
# +load_target+ and the +loaded+ flag are your friends.
|
# +load_target+ and the +loaded+ flag are your friends.
|
||||||
|
@ -228,7 +228,7 @@ module ActiveRecord
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
# Destory all the records from this association.
|
# Destroy all the records from this association.
|
||||||
#
|
#
|
||||||
# See destroy for more info.
|
# See destroy for more info.
|
||||||
def destroy_all
|
def destroy_all
|
||||||
|
|
|
@ -1357,14 +1357,14 @@ module ActiveRecord #:nodoc:
|
||||||
classes
|
classes
|
||||||
rescue
|
rescue
|
||||||
# OPTIMIZE this rescue is to fix this test: ./test/cases/reflection_test.rb:56:in `test_human_name_for_column'
|
# 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.
|
# It now works for sure.
|
||||||
[self]
|
[self]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Transforms attribute key names into a more humane format, such as "First name" instead of "first_name". Example:
|
# 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"
|
# 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.
|
# module now.
|
||||||
# Specify +options+ with additional translating options.
|
# Specify +options+ with additional translating options.
|
||||||
def human_attribute_name(attribute_key_name, options = {})
|
def human_attribute_name(attribute_key_name, options = {})
|
||||||
|
|
|
@ -360,7 +360,7 @@ module ActiveRecord
|
||||||
def call(env)
|
def call(env)
|
||||||
@app.call(env)
|
@app.call(env)
|
||||||
ensure
|
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
|
# this request is a part of integration test
|
||||||
unless env.key?("rack.test")
|
unless env.key?("rack.test")
|
||||||
ActiveRecord::Base.clear_active_connections!
|
ActiveRecord::Base.clear_active_connections!
|
||||||
|
|
|
@ -407,7 +407,7 @@ end
|
||||||
# subdomain: $LABEL
|
# subdomain: $LABEL
|
||||||
#
|
#
|
||||||
# Also, sometimes (like when porting older join table fixtures) you'll need
|
# 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:
|
# to the rescue:
|
||||||
#
|
#
|
||||||
# george_reginald:
|
# george_reginald:
|
||||||
|
|
|
@ -271,7 +271,7 @@ module ActiveRecord
|
||||||
# })
|
# })
|
||||||
#
|
#
|
||||||
# Will update the name of the Person with ID 1, build a new associated
|
# 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.
|
# for destruction.
|
||||||
#
|
#
|
||||||
# Also accepts an Array of attribute hashes:
|
# 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,
|
# default message (e.g. <tt>activerecord.errors.messages.MESSAGE</tt>). The translated model name,
|
||||||
# translated attribute name and the value are available for interpolation.
|
# 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>
|
# 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:
|
# error +message+ for the <tt>title</tt> +attribute+, it looks for these translations:
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue