Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Write a class method for model
class Product < ActiveRecord::Base
class << self
def search_by params = {}
params = params.try(:symbolize_keys) || {}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment