Module: ActsAsCategorizable::Scopes::ClassMethods
- Defined in:
- lib/acts-as-categorizable/scopes.rb
Instance Method Summary collapse
Instance Method Details
#initialize_scopes ⇒ Object
12 13 14 15 16 |
# File 'lib/acts-as-categorizable/scopes.rb', line 12 def initialize_scopes scope :by_slug, -> (slug) { where(slug: slug) } scope :search, -> (term) { where('title like :term', term: term) } scope :active, -> { where(active: true) } end |