Module: MongoMapperExt::Slugizer::ClassMethods
- Defined in:
- lib/mongomapper_ext/slugizer.rb
Instance Method Summary collapse
Instance Method Details
#slug_key(key = :name, options = {}) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/mongomapper_ext/slugizer.rb', line 39 def slug_key(key = :name, = {}) @slug_options ||= @callback_type ||= begin type = [:callback_type] || :before_validation_on_create send(type, :generate_slug) type end @slug_key ||= key end |