Module: Sluggable::ClassMethods

Defined in:
lib/sluggable.rb

Instance Method Summary collapse

Instance Method Details

#slug_from(column, options = {}) ⇒ Object

Determine the database column to use when generating the slug



10
11
12
13
# File 'lib/sluggable.rb', line 10

def slug_from(column, options = {})
  define_method(:slug_source) { column }
  define_method(:slug_scope)  { Array(options[:scope]) }
end