Module: WhereableScope::QueryMethods

Includes:
ScopeHandler
Defined in:
lib/whereable_scope/query_methods.rb

Instance Method Summary collapse

Methods included from ScopeHandler

#extract_whereable_scopes

Instance Method Details

#where!(opts, *rest) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/whereable_scope/query_methods.rb', line 5

def where!(opts, *rest)
  case opts
  when Hash
    extract_whereable_scopes(opts, model) { |scope| merge!(scope) }
    opts.empty? ? self : super
  else
    super
  end
end