aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Collins <ken@metaskills.net>2009-02-09 10:17:37 +0800
committerrick <technoweenie@gmail.com>2009-02-09 10:45:31 +0800
commit706d6a3eddc9c723a25ae1ce1c49be2589092d77 (patch)
tree528a1649ce3d169528654d1f213377bdb2d812fa
parent779b06371bb07163ef0a0f4250a964c2b733d169 (diff)
Change the create_versioned_table class method to ask the connection if table_exists?. Fixes a bug that allows adapters that allow user owned prefixes for table names.
Signed-off-by: rick <technoweenie@gmail.com>
-rw-r--r--lib/acts_as_versioned.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/acts_as_versioned.rb b/lib/acts_as_versioned.rb
index 01f8669fc..a93cacec4 100644
--- a/lib/acts_as_versioned.rb
+++ b/lib/acts_as_versioned.rb
@@ -409,7 +409,7 @@ module ActiveRecord #:nodoc:
self.reset_column_information
end
- return if connection.tables.include?(versioned_table_name.to_s)
+ return if connection.table_exists?(versioned_table_name)
self.connection.create_table(versioned_table_name, create_table_options) do |t|
t.column versioned_foreign_key, :integer