Module: Sequel::Plugins::GenerateSlug::InstanceMethods
- Defined in:
- lib/sequel/plugins/generate_slug.rb
Instance Method Summary collapse
-
#before_validation ⇒ Object
Set the slug before validation if the record is new or the slug needs updating.
Instance Method Details
#before_validation ⇒ Object
Set the slug before validation if the record is new or the slug needs updating.
58 59 60 61 |
# File 'lib/sequel/plugins/generate_slug.rb', line 58 def before_validation set_slug if new? || slug_needs_update? super end |