module ActsAsCategorizable::Scopes::ClassMethods

Public Instance Methods

initialize_scopes() click to toggle source
# 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