Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

(3-2-stable) Fix GH #4285. Remove options when we record calling create_table #4288

Merged
merged 1 commit into from

2 participants

@kennyj
Collaborator

@josevalim Please merge this PR :)

please see #4286

@josevalim josevalim merged commit a10f309 into rails:3-2-stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  activerecord/lib/active_record/migration/command_recorder.rb
@@ -59,7 +59,7 @@ def #{method}(*args) # def create_table(*args)
private
def invert_create_table(args)
- [:drop_table, args]
+ [:drop_table, [args.first]]
end
def invert_rename_table(args)
View
6 activerecord/test/cases/migration/command_recorder_test.rb
@@ -67,6 +67,12 @@ def test_invert_create_table
assert_equal [:drop_table, [:system_settings]], drop_table
end
+ def test_invert_create_table_with_options
+ @recorder.record :create_table, [:people_reminders, {:id => false}]
+ drop_table = @recorder.inverse.first
+ assert_equal [:drop_table, [:people_reminders]], drop_table
+ end
+
def test_invert_rename_table
@recorder.record :rename_table, [:old, :new]
rename = @recorder.inverse.first
Something went wrong with that request. Please try again.