aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/install.rb2
-rwxr-xr-xactiverecord/lib/active_record/associations.rb4
-rw-r--r--activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb6
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb6
-rwxr-xr-xactiverecord/lib/active_record/connection_adapters/abstract_adapter.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/oracle_adapter.rb2
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb4
-rw-r--r--activerecord/lib/active_record/connection_adapters/sybase_adapter.rb2
-rw-r--r--activerecord/lib/active_record/serializers/xml_serializer.rb2
-rwxr-xr-xactiverecord/test/associations_test.rb2
-rwxr-xr-xactiverecord/test/base_test.rb2
-rw-r--r--activerecord/test/migration_test.rb4
-rw-r--r--activerecord/test/pk_test.rb2
-rwxr-xr-xactiverecord/test/unconnected_test.rb2
-rwxr-xr-xactiverecord/test/validations_test.rb2
17 files changed, 24 insertions, 24 deletions
diff --git a/activerecord/install.rb b/activerecord/install.rb
index 592c4b9d9a..c87398b1f4 100644
--- a/activerecord/install.rb
+++ b/activerecord/install.rb
@@ -18,7 +18,7 @@ unless $sitedir
end
end
-# the acual gruntwork
+# the actual gruntwork
Dir.chdir("lib")
Find.find("active_record", "active_record.rb") { |f|
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index cb821ba7f0..e269775fd5 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -716,7 +716,7 @@ module ActiveRecord
#
# Option examples:
# has_one :credit_card, :dependent => :destroy # destroys the associated credit card
- # has_one :credit_card, :dependent => :nullify # updates the associated records foriegn key value to null rather than destroying it
+ # has_one :credit_card, :dependent => :nullify # updates the associated records foreign key value to null rather than destroying it
# has_one :last_comment, :class_name => "Comment", :order => "posted_on"
# has_one :project_manager, :class_name => "Person", :conditions => "role = 'project_manager'"
# has_one :attachment, :as => :attachable
@@ -857,7 +857,7 @@ module ActiveRecord
#
# Deprecated: Any additional fields added to the join table will be placed as attributes when pulling records out through
# +has_and_belongs_to_many+ associations. Records returned from join tables with additional attributes will be marked as
- # +ReadOnly+ (because we can't save changes to the additional attrbutes). It's strongly recommended that you upgrade any
+ # +ReadOnly+ (because we can't save changes to the additional attributes). It's strongly recommended that you upgrade any
# associations with attributes to a real join model (see introduction).
#
# Adds the following methods for retrieval and query:
diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
index 663655213a..d67207fa4d 100644
--- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
+++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -65,7 +65,7 @@ module ActiveRecord
options[:conditions] = conditions
options[:joins] = @join_sql
- options[:readonly] = finding_with_ambigious_select?(options[:select])
+ options[:readonly] = finding_with_ambiguous_select?(options[:select])
if options[:order] && @reflection.options[:order]
options[:order] = "#{options[:order]}, #{@reflection.options[:order]}"
@@ -154,10 +154,10 @@ module ActiveRecord
{ :find => { :conditions => @finder_sql, :joins => @join_sql, :readonly => false } }
end
- # Join tables with additional columns on top of the two foreign keys must be considered ambigious unless a select
+ # Join tables with additional columns on top of the two foreign keys must be considered ambiguous unless a select
# clause has been explicitly defined. Otherwise you can get broken records back, if, for example, the join column also has
# an id column. This will then overwrite the id column of the records coming back.
- def finding_with_ambigious_select?(select_clause)
+ def finding_with_ambiguous_select?(select_clause)
!select_clause && @owner.connection.columns(@reflection.options[:join_table], "Join Table Columns").size != 2
end
end
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 25cd392f9b..a4ebaf4e93 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -150,7 +150,7 @@ module ActiveRecord #:nodoc:
# end
# end
#
- # You can alternatively use self[:attribute]=(value) and self[:attribute] instead of write_attribute(:attribute, vaule) and
+ # You can alternatively use self[:attribute]=(value) and self[:attribute] instead of write_attribute(:attribute, value) and
# read_attribute(:attribute) as a shorter form.
#
# == Accessing attributes before they have been typecasted
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 daeaba0904..a80025e7a7 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb
@@ -133,7 +133,7 @@ module ActiveRecord
# Do nothing by default. Implement for PostgreSQL, Oracle, ...
end
- # Inserts the given fixture into the table. Overriden in adapters that require
+ # Inserts the given fixture into the table. Overridden in adapters that require
# something beyond a simple insert (eg. Oracle).
def insert_fixture(fixture, table_name)
execute "INSERT INTO #{table_name} (#{fixture.key_list}) VALUES (#{fixture.value_list})", 'Fixture Insert'
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 0bedffa0e1..2ae19d2b15 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -142,7 +142,7 @@ module ActiveRecord
# Sets a new default value for a column. If you want to set the default
# value to +NULL+, you are out of luck. You need to
- # DatabaseStatements#execute the apppropriate SQL statement yourself.
+ # DatabaseStatements#execute the appropriate SQL statement yourself.
# ===== Examples
# change_column_default(:suppliers, :qualification, 'new')
# change_column_default(:accounts, :authorized, 1)
@@ -237,7 +237,7 @@ module ActiveRecord
execute "CREATE TABLE #{ActiveRecord::Migrator.schema_info_table_name} (version #{type_to_sql(:integer)})"
execute "INSERT INTO #{ActiveRecord::Migrator.schema_info_table_name} (version) VALUES(0)"
rescue ActiveRecord::StatementInvalid
- # Schema has been intialized
+ # Schema has been initialized
end
end
@@ -255,7 +255,7 @@ module ActiveRecord
def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc:
if native = native_database_types[type]
column_type_sql = native.is_a?(Hash) ? native[:name] : native
- if type == :decimal # ignore limit, use precison and scale
+ if type == :decimal # ignore limit, use precision and scale
precision ||= native[:precision]
scale ||= native[:scale]
if precision
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
index 8ca23ccdaf..18de0e0739 100755
--- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb
@@ -129,7 +129,7 @@ module ActiveRecord
end
rescue Exception => e
# Log message and raise exception.
- # Set last_verfication to 0, so that connection gets verified
+ # Set last_verification to 0, so that connection gets verified
# upon reentering the request loop
@last_verification = 0
message = "#{e.class.name}: #{e.message}: #{sql}"
diff --git a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
index 99e22ca3f3..c862ebcb7c 100644
--- a/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb
@@ -260,7 +260,7 @@ begin
end
- # Inserts the given fixture into the table. Overriden to properly handle lobs.
+ # Inserts the given fixture into the table. Overridden to properly handle lobs.
def insert_fixture(fixture, table_name)
super
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 6a2b32a370..786ad1c864 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -70,7 +70,7 @@ module ActiveRecord
# Unescapes bytea output from a database to the binary string it represents.
def self.binary_to_string(value)
- # In each case, check if the value actually is escaped PostgresSQL bytea output
+ # In each case, check if the value actually is escaped PostgreSQL bytea output
# or an unescaped Active Record attribute that was just written.
if PGconn.respond_to?(:unescape_bytea)
self.class.module_eval do
@@ -784,7 +784,7 @@ module ActiveRecord
row.each_index do |cell_index|
# If this is a money type column and there are any currency symbols,
# then strip them off. Indeed it would be prettier to do this in
- # PostgresSQLColumn.string_to_decimal but would break form input
+ # PostgreSQLColumn.string_to_decimal but would break form input
# fields that call value_before_type_cast.
if res.type(cell_index) == MONEY_COLUMN_TYPE_OID
# Because money output is formatted according to the locale, there are two
diff --git a/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb b/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
index d8ff88b287..5fc12f4b77 100644
--- a/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sybase_adapter.rb
@@ -1,4 +1,4 @@
-# sybase_adaptor.rb
+# sybase_adapter.rb
# Author: John R. Sheets
#
# 01 Mar 2006: Initial version. Based on code from Will Sobel
diff --git a/activerecord/lib/active_record/serializers/xml_serializer.rb b/activerecord/lib/active_record/serializers/xml_serializer.rb
index 89559ce709..5a140019eb 100644
--- a/activerecord/lib/active_record/serializers/xml_serializer.rb
+++ b/activerecord/lib/active_record/serializers/xml_serializer.rb
@@ -1,7 +1,7 @@
module ActiveRecord #:nodoc:
module Serialization
# Builds an XML document to represent the model. Some configuration is
- # availble through +options+, however more complicated cases should use
+ # available through +options+, however more complicated cases should use
# override ActiveRecord's to_xml.
#
# By default the generated XML document will include the processing
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb
index 8cb3c16a66..e6c7944dbb 100755
--- a/activerecord/test/associations_test.rb
+++ b/activerecord/test/associations_test.rb
@@ -1474,7 +1474,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase
assert_equal 1, project.access_level.to_i
end
- def test_hatbm_attribute_access_and_respond_to
+ def test_habtm_attribute_access_and_respond_to
project = developers(:jamis).projects[0]
assert project.has_attribute?("name")
assert project.has_attribute?("joined_on")
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index 4fb7f39ecc..1883f369c3 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -800,7 +800,7 @@ class BasicsTest < Test::Unit::TestCase
assert_nil keyboard.id
end
- def test_customized_primary_key_remains_protected_when_refered_to_as_id
+ def test_customized_primary_key_remains_protected_when_referred_to_as_id
subscriber = Subscriber.new(:id => 'webster123', :name => 'nice try')
assert_nil subscriber.id
diff --git a/activerecord/test/migration_test.rb b/activerecord/test/migration_test.rb
index 69e9212fa6..9ac9bb10fd 100644
--- a/activerecord/test/migration_test.rb
+++ b/activerecord/test/migration_test.rb
@@ -340,7 +340,7 @@ if ActiveRecord::Base.connection.supports_migrations?
assert_equal 127, jonnyg.intelligence_quotient
jonnyg.destroy
ensure
- ActiveRecord::Migration.remove_column :people, :intelligece_quotient rescue nil
+ ActiveRecord::Migration.remove_column :people, :intelligence_quotient rescue nil
end
end
@@ -578,7 +578,7 @@ if ActiveRecord::Base.connection.supports_migrations?
assert_equal BigDecimal("1000234000567.95"), b.big_bank_balance
# This one is fun. The 'value_of_e' field is defined as 'DECIMAL' with
- # precision/scale explictly left out. By the SQL standard, numbers
+ # precision/scale explicitly left out. By the SQL standard, numbers
# assigned to this field should be truncated but that's seldom respected.
if current_adapter?(:PostgreSQLAdapter, :SQLite2Adapter)
# - PostgreSQL changes the SQL spec on columns declared simply as
diff --git a/activerecord/test/pk_test.rb b/activerecord/test/pk_test.rb
index 4daef43062..431ff9af9d 100644
--- a/activerecord/test/pk_test.rb
+++ b/activerecord/test/pk_test.rb
@@ -95,7 +95,7 @@ class PrimaryKeysTest < Test::Unit::TestCase
def test_instance_update_should_quote_pkey
assert_nothing_raised { MixedCaseMonkey.find(1).save }
end
- def test_instance_destry_should_quote_pkey
+ def test_instance_destroy_should_quote_pkey
assert_nothing_raised { MixedCaseMonkey.find(1).destroy }
end
end
diff --git a/activerecord/test/unconnected_test.rb b/activerecord/test/unconnected_test.rb
index 2d06410dd8..8079a051e5 100755
--- a/activerecord/test/unconnected_test.rb
+++ b/activerecord/test/unconnected_test.rb
@@ -3,7 +3,7 @@ require 'abstract_unit'
class TestRecord < ActiveRecord::Base
end
-class TestUnconnectedAdaptor < Test::Unit::TestCase
+class TestUnconnectedAdapter < Test::Unit::TestCase
self.use_transactional_fixtures = false
def setup
diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb
index d0c54d1528..4b91d86b18 100755
--- a/activerecord/test/validations_test.rb
+++ b/activerecord/test/validations_test.rb
@@ -661,7 +661,7 @@ class ValidationsTest < Test::Unit::TestCase
end
end
- def test_validates_length_with_globaly_modified_error_message
+ def test_validates_length_with_globally_modified_error_message
ActiveRecord::Errors.default_error_messages[:too_short] = 'tu est trops petit hombre %d'
Topic.validates_length_of :title, :minimum => 10
t = Topic.create(:title => 'too short')