Commit Graph

3 Commits

Author SHA1 Message Date
Julian Herrero
3bf2fa1b17 Add method find_by_slug_or_id to Sluggable module
Make it easier to find by slug or id for sluggable models. Will return
nil if resource is not found.
2019-01-25 09:08:28 +01:00
Bertocq
e0871e5dc6 Only update slug if empty or model condition is met 2018-02-04 23:04:48 +01:00
Bertocq
4535fc9345 Create Sluggable concern, generates slug using name attribute before validation
Why:

* We need a way to generate a slug for a object given his name attribute value

How:

* A concern that generates the slug before validation
2017-07-04 18:40:54 +02:00