Skip to content

Instantly share code, notes, and snippets.

View mnhpub's full-sized avatar
tokime

Mike H mnhpub

tokime
  • BFSIO
  • Washington, DC
  • 00:11 (UTC -05:00)
View GitHub Profile
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with the same name as the keys in <tt>filtering_params</tt>
# with their associated values. Most useful for calling named scopes from