Module: Sluggify::ClassMethods

Defined in:
lib/sluggify/sluggify.rb

Instance Method Summary collapse

Instance Method Details

#sluggify(field_name, options) ⇒ Object



27
28
29
30
31
32
# File 'lib/sluggify/sluggify.rb', line 27

def sluggify(field_name,options)
  self.slug_field=field_name
  options[:on].each do |cb|
    self.send(:"before_#{cb}", :generate_slug)
  end
end