Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert table_name= needs connection now, so just stub table_name

  • Loading branch information...
commit f2b048529bd8020505baf999fe23a365753a8280 1 parent f0ad853
@kennyj authored
View
2  activerecord/lib/active_record/model_schema.rb
@@ -118,7 +118,7 @@ def table_name=(value)
if defined?(@table_name)
return if value == @table_name
- reset_column_information
+ reset_column_information if connected?
end
@table_name = value
View
2  railties/test/generators/session_migration_generator_test.rb
@@ -15,7 +15,7 @@ def test_session_migration_with_given_name
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)
Please sign in to comment.
Something went wrong with that request. Please try again.