lib/mysql2xxxx/properties.rb in mysql2xxxx-0.0.2 vs lib/mysql2xxxx/properties.rb in mysql2xxxx-0.0.3
- old
+ new
@@ -41,12 +41,14 @@
end
private
def active_record_connection
- if defined? ::ActiveRecord
+ if defined?(::ActiveRecord)
::ActiveRecord::Base.connection
end
+ rescue
+ # oh well
end
def active_record_config
if active_record_connection
active_record_connection.instance_variable_get :@config