Module: Pacecar::Search::ClassMethods

Defined in:
lib/pacecar/search.rb

Instance Method Summary collapse

Instance Method Details

#define_search_scopesObject



13
14
15
16
17
18
19
# File 'lib/pacecar/search.rb', line 13

def define_search_scopes
  safe_column_names.each do |name|
    scope "#{name}_equals", ->(query) {
      where(name => query)
    }
  end
end