mirror of
https://github.com/activerecord-hackery/ransack.git
synced 2022-11-09 13:47:45 -05:00
17 lines
No EOL
753 B
Ruby
17 lines
No EOL
753 B
Ruby
require 'ransack/adapters/active_record/base'
|
|
ActiveRecord::Base.extend Ransack::Adapters::ActiveRecord::Base
|
|
|
|
case ActiveRecord::VERSION::STRING
|
|
when /^3\.0\./
|
|
require 'ransack/adapters/active_record/3.0/join_dependency'
|
|
require 'ransack/adapters/active_record/3.0/join_association'
|
|
require 'ransack/adapters/active_record/3.0/context'
|
|
|
|
ActiveRecord::Associations::ClassMethods::JoinDependency.send :include, Ransack::Adapters::ActiveRecord::JoinDependency
|
|
else
|
|
require 'ransack/adapters/active_record/join_dependency'
|
|
require 'ransack/adapters/active_record/join_association'
|
|
require 'ransack/adapters/active_record/context'
|
|
|
|
ActiveRecord::Associations::JoinDependency.send :include, Ransack::Adapters::ActiveRecord::JoinDependency
|
|
end |