Skip to content

Commit

Permalink
handle table_definition overrides compatible with 3.x as well as 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Mar 21, 2013
1 parent 327835e commit 93d0f00
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/arjdbc/jdbc/adapter.rb
Expand Up @@ -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
Expand Down

0 comments on commit 93d0f00

Please sign in to comment.