mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert table_name= needs connection now, so just stub table_name
This commit is contained in:
parent
f0ad8532f3
commit
f2b048529b
2 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,7 @@ module ActiveRecord
|
|||
|
||||
if defined?(@table_name)
|
||||
return if value == @table_name
|
||||
reset_column_information
|
||||
reset_column_information if connected?
|
||||
end
|
||||
|
||||
@table_name = value
|
||||
|
|
|
@ -15,7 +15,7 @@ class SessionMigrationGeneratorTest < Rails::Generators::TestCase
|
|||
end
|
||||
|
||||
def test_session_migration_with_custom_table_name
|
||||
ActiveRecord::SessionStore::Session.stubs(:table_name => "custom_table_name")
|
||||
ActiveRecord::SessionStore::Session.table_name = "custom_table_name"
|
||||
run_generator
|
||||
assert_migration "db/migrate/add_sessions_table.rb" do |migration|
|
||||
assert_match(/class AddSessionsTable < ActiveRecord::Migration/, migration)
|
||||
|
|
Loading…
Reference in a new issue