Sha256: ff0d9ba67a2703bacf2c13ed5e03b79fb31b0f0509188bb99450dcd27e3699c5

Contents?: true

Size: 1.8 KB

Versions: 11

Compression:

Stored size: 1.8 KB

Contents

require "searchlogic/core_ext/proc"
require "searchlogic/core_ext/object"
require "searchlogic/active_record/association_proxy"
require "searchlogic/active_record/consistency"
require "searchlogic/active_record/named_scope_tools"
require "searchlogic/named_scopes/conditions"
require "searchlogic/named_scopes/ordering"
require "searchlogic/named_scopes/association_conditions"
require "searchlogic/named_scopes/association_ordering"
require "searchlogic/named_scopes/alias_scope"
require "searchlogic/named_scopes/or_conditions"
require "searchlogic/search"

Proc.send(:include, Searchlogic::CoreExt::Proc)
Object.send(:include, Searchlogic::CoreExt::Object)

module ActiveRecord # :nodoc: all
  module Associations
    class AssociationProxy
      include Searchlogic::ActiveRecord::AssociationProxy
    end
  end

  class Base
    class << self; include Searchlogic::ActiveRecord::Consistency; end
  end
end

ActiveRecord::Base.extend(Searchlogic::ActiveRecord::NamedScopeTools)
ActiveRecord::Base.extend(Searchlogic::NamedScopes::Conditions)
ActiveRecord::Base.extend(Searchlogic::NamedScopes::AssociationConditions)
ActiveRecord::Base.extend(Searchlogic::NamedScopes::AssociationOrdering)
ActiveRecord::Base.extend(Searchlogic::NamedScopes::Ordering)
ActiveRecord::Base.extend(Searchlogic::NamedScopes::AliasScope)
ActiveRecord::Base.extend(Searchlogic::NamedScopes::OrConditions)
ActiveRecord::Base.extend(Searchlogic::Search::Implementation)

# Try to use the search method, if it's available. Thinking sphinx and other plugins
# like to use that method as well.
if !ActiveRecord::Base.respond_to?(:search)
  ActiveRecord::Base.class_eval { class << self; alias_method :search, :searchlogic; end }
end

if defined?(ActionController)
  require "searchlogic/rails_helpers"
  ActionController::Base.helper(Searchlogic::RailsHelpers)
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
searchlogic-2.4.25 lib/searchlogic.rb
searchlogic-2.4.24 lib/searchlogic.rb
searchlogic-2.4.23 lib/searchlogic.rb
searchlogic-2.4.22 lib/searchlogic.rb
searchlogic-2.4.21 lib/searchlogic.rb
gravis-searchlogic-2.4.20 lib/searchlogic.rb
searchlogic-2.4.19 lib/searchlogic.rb
searchlogic-2.4.18 lib/searchlogic.rb
searchlogic-2.4.17 lib/searchlogic.rb
searchlogic-2.4.16 lib/searchlogic.rb
searchlogic-2.4.15 lib/searchlogic.rb