Class: Formats::Category

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/formats/category.rb

Class Method Summary collapse

Class Method Details

.sunrise_search(params) ⇒ Object



26
27
28
29
30
31
# File 'app/models/formats/category.rb', line 26

def sunrise_search(params)
  q = normal
  q = q.where('title LIKE ?', "%#{params[:title]}%") if params[:title].present?
  q = q.where(service_id: params[:service_id]) if params[:service_id].present?
  q
end