aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2007-11-08 03:37:16 +0000
committerMarcel Molina <marcel@vernix.org>2007-11-08 03:37:16 +0000
commit7143d80147ea26c66dfa1dd4bb82f066d72f6570 (patch)
tree066af9459361f182fa25786b99e44fcb7415941d /activerecord/lib/active_record/connection_adapters/abstract
parent709dc33c927652cc5ffb5758811e036336c95038 (diff)
downloadrails-7143d80147ea26c66dfa1dd4bb82f066d72f6570.tar.gz
rails-7143d80147ea26c66dfa1dd4bb82f066d72f6570.tar.bz2
rails-7143d80147ea26c66dfa1dd4bb82f066d72f6570.zip
Smattering of grammatical fixes to documentation. Closes #10083 [BobSilva]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8113 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb8
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb5
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb4
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb6
4 files changed, 12 insertions, 11 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
index 801cb23362..51b90d3c64 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
@@ -243,7 +243,7 @@ module ActiveRecord
end
# Locate the connection of the nearest super class. This can be an
- # active or defined connections: if it is the latter, it will be
+ # active or defined connection: if it is the latter, it will be
# opened and set as the active connection for the class it was defined
# for (not necessarily the current class).
def self.retrieve_connection #:nodoc:
@@ -264,15 +264,15 @@ module ActiveRecord
conn or raise ConnectionNotEstablished
end
- # Returns true if a connection that's accessible to this class have already been opened.
+ # Returns true if a connection that's accessible to this class has already been opened.
def self.connected?
active_connections[active_connection_name] ? true : false
end
# Remove the connection for this class. This will close the active
# connection and the defined connection (if they exist). The result
- # can be used as argument for establish_connection, for easy
- # re-establishing of the connection.
+ # can be used as an argument for establish_connection, for easily
+ # re-establishing the connection.
def self.remove_connection(klass=self)
spec = @@defined_connections[klass.name]
konn = active_connections[klass.name]
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
index 066baaba45..589acd3945 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -98,7 +98,7 @@ module ActiveRecord
add_limit_offset!(sql, options) if options
end
- # Appends +LIMIT+ and +OFFSET+ options to a SQL statement.
+ # Appends +LIMIT+ and +OFFSET+ options to an SQL statement.
# This method *modifies* the +sql+ parameter.
# ===== Examples
# add_limit_offset!('SELECT * FROM suppliers', {:limit => 10, :offset => 50})
@@ -113,7 +113,8 @@ module ActiveRecord
end
end
- # Appends a locking clause to a SQL statement. *Modifies the +sql+ parameter*.
+ # Appends a locking clause to an SQL statement.
+ # This method *modifies* the +sql+ parameter.
# # SELECT * FROM suppliers FOR UPDATE
# add_lock! 'SELECT * FROM suppliers', :lock => true
# add_lock! 'SELECT * FROM suppliers', :lock => ' FOR UPDATE'
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
index 6bd56fd3c8..c6cdc776d6 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -272,7 +272,7 @@ module ActiveRecord
end
# Represents a SQL table in an abstract way.
- # Columns are stored as ColumnDefinition in the #columns attribute.
+ # Columns are stored as a ColumnDefinition in the #columns attribute.
class TableDefinition
attr_accessor :columns
@@ -451,7 +451,7 @@ module ActiveRecord
alias :belongs_to :references
# Returns a String whose contents are the column definitions
- # concatenated together. This string can then be pre and appended to
+ # concatenated together. This string can then be prepended and appended to
# to generate the final SQL to create the table.
def to_sql
@columns * ', '
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index d4fcded32a..8f981438df 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -54,7 +54,7 @@ module ActiveRecord
# [<tt>:temporary</tt>]
# Make a temporary table.
# [<tt>:force</tt>]
- # Set to true or false to drop the table before creating it.
+ # Set to true to drop the table before creating it.
# Defaults to false.
#
# ===== Examples
@@ -160,13 +160,13 @@ module ActiveRecord
# Adds a new index to the table. +column_name+ can be a single Symbol, or
# an Array of Symbols.
#
- # The index will be named after the table and the first column names,
+ # The index will be named after the table and the first column name,
# unless you pass +:name+ as an option.
#
# When creating an index on multiple columns, the first column is used as a name
# for the index. For example, when you specify an index on two columns
# [+:first+, +:last+], the DBMS creates an index for both columns as well as an
- # index for the first colum +:first+. Using just the first name for this index
+ # index for the first column +:first+. Using just the first name for this index
# makes sense, because you will never have to create a singular index with this
# name.
#