mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix typo: overriden => overriDDen
This commit is contained in:
parent
5533994b33
commit
cec0343965
4 changed files with 5 additions and 5 deletions
|
@ -444,7 +444,7 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def init_changed_attributes
|
def init_changed_attributes
|
||||||
# Intentionally avoid using #column_defaults since overriden defaults (as is done in
|
# Intentionally avoid using #column_defaults since overridden defaults (as is done in
|
||||||
# optimistic locking) won't get written unless they get marked as changed
|
# optimistic locking) won't get written unless they get marked as changed
|
||||||
self.class.columns.each do |c|
|
self.class.columns.each do |c|
|
||||||
attr, orig_value = c.name, c.default
|
attr, orig_value = c.name, c.default
|
||||||
|
|
|
@ -1579,7 +1579,7 @@ class BasicsTest < ActiveRecord::TestCase
|
||||||
assert_equal ['foo'], klass.all.merge!(select: 'foo').select_values
|
assert_equal ['foo'], klass.all.merge!(select: 'foo').select_values
|
||||||
end
|
end
|
||||||
|
|
||||||
test "connection_handler can be overriden" do
|
test "connection_handler can be overridden" do
|
||||||
klass = Class.new(ActiveRecord::Base)
|
klass = Class.new(ActiveRecord::Base)
|
||||||
orig_handler = klass.connection_handler
|
orig_handler = klass.connection_handler
|
||||||
new_handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
|
new_handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
|
||||||
|
|
|
@ -128,7 +128,7 @@ module ActiveRecord
|
||||||
prev_default_scopes = Topic.default_scopes
|
prev_default_scopes = Topic.default_scopes
|
||||||
Topic.default_scopes = [Topic.where(:approved => true)]
|
Topic.default_scopes = [Topic.where(:approved => true)]
|
||||||
topic = Topic.new(:approved => false)
|
topic = Topic.new(:approved => false)
|
||||||
assert !topic.dup.approved?, "should not be overriden by default scopes"
|
assert !topic.dup.approved?, "should not be overridden by default scopes"
|
||||||
ensure
|
ensure
|
||||||
Topic.default_scopes = prev_default_scopes
|
Topic.default_scopes = prev_default_scopes
|
||||||
end
|
end
|
||||||
|
|
|
@ -293,7 +293,7 @@ class HasManyScopingTest< ActiveRecord::TestCase
|
||||||
assert_equal [magician], people(:michael).bad_references
|
assert_equal [magician], people(:michael).bad_references
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_should_default_scope_on_associations_is_overriden_by_association_conditions
|
def test_should_default_scope_on_associations_is_overridden_by_association_conditions
|
||||||
reference = references(:michael_unicyclist).becomes(BadReference)
|
reference = references(:michael_unicyclist).becomes(BadReference)
|
||||||
assert_equal [reference], people(:michael).fixed_bad_references
|
assert_equal [reference], people(:michael).fixed_bad_references
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue