aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-05-25 12:29:00 +0100
committerPratik Naik <pratiknaik@gmail.com>2008-05-25 12:29:00 +0100
commit98dc582742779081e71e697fcdf8d9ae2b421b16 (patch)
treef5680eef86e689a10d0f75434ba6a4e94829e439 /activerecord/lib/active_record/connection_adapters/abstract
parent6277fd91133a3566333612857510d74de60d67f4 (diff)
downloadrails-98dc582742779081e71e697fcdf8d9ae2b421b16.tar.gz
rails-98dc582742779081e71e697fcdf8d9ae2b421b16.tar.bz2
rails-98dc582742779081e71e697fcdf8d9ae2b421b16.zip
Merge docrails.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb4
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb32
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb2
4 files changed, 20 insertions, 20 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 34627dfaf9..2a8807fb78 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
@@ -193,7 +193,7 @@ module ActiveRecord
# :database => "path/to/dbfile"
# )
#
- # Also accepts keys as strings (for parsing from yaml for example):
+ # Also accepts keys as strings (for parsing from YAML for example):
#
# ActiveRecord::Base.establish_connection(
# "adapter" => "sqlite",
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 589acd3945..16d405d3bd 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -29,7 +29,7 @@ module ActiveRecord
end
# Returns an array of arrays containing the field values.
- # Order is the same as that returned by #columns.
+ # Order is the same as that returned by +columns+.
def select_rows(sql, name = nil)
raise NotImplementedError, "select_rows is an abstract method"
end
@@ -93,7 +93,7 @@ module ActiveRecord
# done if the transaction block raises an exception or returns false.
def rollback_db_transaction() end
- # Alias for #add_limit_offset!.
+ # Alias for <tt>add_limit_offset!</tt>.
def add_limit!(sql, options)
add_limit_offset!(sql, options) if options
end
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 fdb18b234c..f968b9b173 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -16,9 +16,9 @@ module ActiveRecord
# Instantiates a new column in the table.
#
- # +name+ is the column's name, as in <tt><b>supplier_id</b> int(11)</tt>.
- # +default+ is the type-casted default value, such as <tt>sales_stage varchar(20) default <b>'new'</b></tt>.
- # +sql_type+ is only used to extract the column's length, if necessary. For example, <tt>company_name varchar(<b>60</b>)</tt>.
+ # +name+ is the column's name, such as <tt>supplier_id</tt> in <tt>supplier_id int(11)</tt>.
+ # +default+ is the type-casted default value, such as +new+ in <tt>sales_stage varchar(20) default 'new'</tt>.
+ # +sql_type+ is only used to extract the column's length, if necessary. For example +60+ in <tt>company_name varchar(60)</tt>.
# +null+ determines if this column allows +NULL+ values.
def initialize(name, default, sql_type = nil, null = true)
@name, @sql_type, @null = name, sql_type, null
@@ -92,7 +92,7 @@ module ActiveRecord
# Returns the human name of the column name.
#
# ===== Examples
- # Column.new('sales_stage', ...).human_name #=> 'Sales stage'
+ # Column.new('sales_stage', ...).human_name # => 'Sales stage'
def human_name
Base.human_attribute_name(@name)
end
@@ -270,7 +270,7 @@ module ActiveRecord
end
# Represents a SQL table in an abstract way.
- # Columns are stored as a ColumnDefinition in the #columns attribute.
+ # Columns are stored as a ColumnDefinition in the +columns+ attribute.
class TableDefinition
attr_accessor :columns
@@ -350,28 +350,28 @@ module ActiveRecord
# == Examples
# # Assuming td is an instance of TableDefinition
# td.column(:granted, :boolean)
- # #=> granted BOOLEAN
+ # # granted BOOLEAN
#
# td.column(:picture, :binary, :limit => 2.megabytes)
- # #=> picture BLOB(2097152)
+ # # => picture BLOB(2097152)
#
# td.column(:sales_stage, :string, :limit => 20, :default => 'new', :null => false)
- # #=> sales_stage VARCHAR(20) DEFAULT 'new' NOT NULL
+ # # => sales_stage VARCHAR(20) DEFAULT 'new' NOT NULL
#
- # def.column(:bill_gates_money, :decimal, :precision => 15, :scale => 2)
- # #=> bill_gates_money DECIMAL(15,2)
+ # td.column(:bill_gates_money, :decimal, :precision => 15, :scale => 2)
+ # # => bill_gates_money DECIMAL(15,2)
#
- # def.column(:sensor_reading, :decimal, :precision => 30, :scale => 20)
- # #=> sensor_reading DECIMAL(30,20)
+ # td.column(:sensor_reading, :decimal, :precision => 30, :scale => 20)
+ # # => sensor_reading DECIMAL(30,20)
#
# # While <tt>:scale</tt> defaults to zero on most databases, it
# # probably wouldn't hurt to include it.
- # def.column(:huge_integer, :decimal, :precision => 30)
- # #=> huge_integer DECIMAL(30)
+ # td.column(:huge_integer, :decimal, :precision => 30)
+ # # => huge_integer DECIMAL(30)
#
# == Short-hand examples
#
- # Instead of calling column directly, you can also work with the short-hand definitions for the default types.
+ # Instead of calling +column+ directly, you can also work with the short-hand definitions for the default types.
# They use the type as the method name instead of as a parameter and allow for multiple columns to be defined
# in a single statement.
#
@@ -395,7 +395,7 @@ module ActiveRecord
# end
#
# There's a short-hand method for each of the type values declared at the top. And then there's
- # TableDefinition#timestamps that'll add created_at and updated_at as datetimes.
+ # TableDefinition#timestamps that'll add created_at and +updated_at+ as datetimes.
#
# TableDefinition#references will add an appropriately-named _id column, plus a corresponding _type
# column if the <tt>:polymorphic</tt> option is supplied. If <tt>:polymorphic</tt> is a hash of options, these will be
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 b57d0a3ef7..67d70b3886 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -32,7 +32,7 @@ module ActiveRecord
def columns(table_name, name = nil) end
# Creates a new table
- # There are two ways to work with #create_table. You can use the block
+ # There are two ways to work with +create_table+. You can use the block
# form or the regular form, like this:
#
# === Block form