def self.included(base)
unless base.respond_to?(:construct_finder_sql_ext)
base.extend ClassMethods
base.extend ActiveRecord::Extensions::SqlGeneration
base.extend HavingOptionBackCompatibility
base.extend ConstructSqlCompatibility
base.class_eval do
class << self
VALID_FIND_OPTIONS.concat([:pre_sql, :post_sql, :keywords, :ignore, :rollup, :override_select, :having, :index_hint])
alias_method :construct_finder_sql, :construct_finder_sql_ext
alias_method_chain :construct_finder_sql_with_included_associations, :ext
end
end
end
end