Permalink
Browse files

handle table_definition overrides compatible with 3.x as well as 4.0

  • Loading branch information...
1 parent 327835e commit 93d0f000bc91ff63049d57efc9efe30780cda03a @kares kares committed Mar 21, 2013
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/arjdbc/jdbc/adapter.rb
View
@@ -423,6 +423,17 @@ def last_inserted_id(result)
result
end
+ # if adapter overrides #table_definition it works on 3.x as well as 4.0
+ if ActiveRecord::VERSION::MAJOR > 3
+
+ alias table_definition create_table_definition
+
+ def create_table_definition
+ table_definition
+ end
+
+ end
+
private
# #deprecated no longer used

0 comments on commit 93d0f00

Please sign in to comment.