3
4
5
6
7
8
9
10
|
# File 'lib/simple_slugs/act_macro.rb', line 3
def has_slug(options = {})
return if respond_to?(:slugger)
before_validation lambda { |record| record.slugger.unique_slug!(record) }
class_inheritable_accessor :slugger
self.slugger = Slugger.new(self, options)
end
|