Class: Locomotive::Snippet

Inherits:
Object
  • Object
show all
Includes:
Concerns::Shared::SiteScope, Concerns::Shared::Slug, Mongoid::Document
Defined in:
app/models/locomotive/snippet.rb

Instance Method Summary collapse

Instance Method Details

#by_id_or_slugObject

named scopes ##


18
# File 'app/models/locomotive/snippet.rb', line 18

scope :by_id_or_slug, ->(id_or_slug) { all.or({ _id: id_or_slug }, { slug: id_or_slug }) }

#nameObject

behaviours ##


9
# File 'app/models/locomotive/snippet.rb', line 9

field :name

#touch_site_attributeObject

methods ##


28
29
30
# File 'app/models/locomotive/snippet.rb', line 28

def touch_site_attribute
  :template_version
end