Skip to content

Commit

Permalink
Use ActiveRecord version instead of Rails'
Browse files Browse the repository at this point in the history
...So this will work in non-Rails apps
  • Loading branch information
afair committed Jun 9, 2014
1 parent efe956d commit d54c8ca
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module ConnectionAdapters
module PostgreSQLTypeMap
# Returns the private "type_map" needed for the cursor operation
def get_type_map # :nodoc:
if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 0
if ::ActiveRecord::VERSION::MAJOR == 4 && ::ActiveRecord::VERSION::MINOR == 0
::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::TYPE_MAP
else
type_map
Expand Down

0 comments on commit d54c8ca

Please sign in to comment.