module Namekuji::Sluggable
Public Instance Methods
to_param()
click to toggle source
# File lib/namekuji/sluggable.rb, line 3 def to_param send(self.class.slug_field) end
Protected Instance Methods
slugify()
click to toggle source
Generate the slug by removing parentheses, then running ‘ActiveSupport::Inflector#parameterize` on the sluggable field.
# File lib/namekuji/sluggable.rb, line 11 def slugify send("#{self.class.slug_field}=", send(self.class.sluggable_field).tr("'", "").parameterize) end