class OTR::ActiveRecord::Compatibility4
Compatibility layer for ActiveRecord
4
Attributes
major_version[R]
Public Class Methods
new()
click to toggle source
Compatibility layer for ActiveRecord
4
# File lib/otr-activerecord/compatibility_4.rb, line 8 def initialize @major_version = 4 ::ActiveRecord::Base.default_timezone = :utc ::ActiveRecord::Base.logger = Logger.new(STDOUT) end
Public Instance Methods
force_db_test_env?()
click to toggle source
Force RACK_ENV/RAILS_ENV to be 'test' when running any db:test:* tasks
# File lib/otr-activerecord/compatibility_4.rb, line 30 def force_db_test_env? true end
migration_base_class_name()
click to toggle source
Basename of migration classes
# File lib/otr-activerecord/compatibility_4.rb, line 25 def migration_base_class_name 'ActiveRecord::Migration' end
migrations_path()
click to toggle source
The dir in which to put new migrations
# File lib/otr-activerecord/compatibility_4.rb, line 20 def migrations_path OTR::ActiveRecord.migrations_paths[0] end
migrations_paths()
click to toggle source
All db migration dir paths
# File lib/otr-activerecord/compatibility_4.rb, line 15 def migrations_paths OTR::ActiveRecord.migrations_paths end