提交 cec03439 编写于 作者: A Alexander Balashov

Fix typo: overriden => overriDDen

上级 5533994b
......@@ -78,7 +78,7 @@ module Core
self.disable_implicit_join_references = false
class_attribute :default_connection_handler, instance_writer: false
def self.connection_handler
Thread.current[:active_record_connection_handler] || self.default_connection_handler
end
......@@ -444,7 +444,7 @@ def init_internals
end
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
self.class.columns.each do |c|
attr, orig_value = c.name, c.default
......
......@@ -1579,7 +1579,7 @@ def test_default_values_are_deeply_dupped
assert_equal ['foo'], klass.all.merge!(select: 'foo').select_values
end
test "connection_handler can be overriden" do
test "connection_handler can be overridden" do
klass = Class.new(ActiveRecord::Base)
orig_handler = klass.connection_handler
new_handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
......
......@@ -128,7 +128,7 @@ def test_dup_with_default_scope
prev_default_scopes = Topic.default_scopes
Topic.default_scopes = [Topic.where(:approved => true)]
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
Topic.default_scopes = prev_default_scopes
end
......
......@@ -293,7 +293,7 @@ def test_should_maintain_default_scope_on_associations
assert_equal [magician], people(:michael).bad_references
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)
assert_equal [reference], people(:michael).fixed_bad_references
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册