Module: Slugworth::ClassMethods
- Defined in:
- lib/slugworth.rb
Instance Method Summary collapse
Instance Method Details
#find_by_slug(slug) ⇒ Object
17 18 19 |
# File 'lib/slugworth.rb', line 17 def find_by_slug(slug) find_by!(slug: slug) end |
#slugged_with(slug_attribute) ⇒ Object
13 14 15 |
# File 'lib/slugworth.rb', line 13 def slugged_with(slug_attribute) self.slug_attribute = slug_attribute end |