Sha256: d0bb867d2b31518efc348eb246ee699e89c53aabf259b26b4b607f8cdd22617e

Contents?: true

Size: 565 Bytes

Versions: 31

Compression:

Stored size: 565 Bytes

Contents

module Searchlogic
  class Search
    module Scopes
      private
        def scope_name(condition_name)
          condition_name && normalize_scope_name(condition_name)
        end

        def scope?(scope_name)
          klass.scopes.key?(scope_name) || klass.condition?(scope_name)
        end

        def scope_options(name)
          klass.send(name, nil) if !klass.respond_to?(name) # We need to set up the named scope if it doesn't exist, so we can get a value for named_scope_options
          klass.named_scope_options(name)
        end
    end
  end
end

Version data entries

31 entries across 31 versions & 4 rubygems

Version Path
searchlogic-2.5.19 lib/searchlogic/search/scopes.rb
searchlogic-2.5.18 lib/searchlogic/search/scopes.rb
searchlogic-2.5.17 lib/searchlogic/search/scopes.rb
searchlogic-2.5.16 lib/searchlogic/search/scopes.rb
searchlogic-2.5.15 lib/searchlogic/search/scopes.rb
searchlogic-2.5.14 lib/searchlogic/search/scopes.rb
searchlogic-2.5.13 lib/searchlogic/search/scopes.rb
searchlogic-2.5.12 lib/searchlogic/search/scopes.rb
searchlogic-2.5.11 lib/searchlogic/search/scopes.rb
searchlogic-2.5.10 lib/searchlogic/search/scopes.rb
searchlogic-2.5.9 lib/searchlogic/search/scopes.rb
searchlogic-2.5.8 lib/searchlogic/search/scopes.rb
searchlogic-2.5.7 lib/searchlogic/search/scopes.rb
searchlogic-2.5.6 lib/searchlogic/search/scopes.rb
searchlogic-2.5.5 lib/searchlogic/search/scopes.rb
searchlogic-2.5.4 lib/searchlogic/search/scopes.rb
searchlogic-2.5.3 lib/searchlogic/search/scopes.rb
searchlogic-2.5.2 lib/searchlogic/search/scopes.rb
searchlogic-2.5.1 lib/searchlogic/search/scopes.rb
searchlogic-2.5.0 lib/searchlogic/search/scopes.rb