Module: HasSlug
- Defined in:
- lib/has_slug.rb
Overview
has_slug is a slugging library for Ruby on Rails
Defined Under Namespace
Modules: ClassMethods, NotSluggableClassMethods, NotSluggableInstanceMethods, SluggableClassMethods, SluggableInstanceMethods
Class Method Summary collapse
-
.enable ⇒ Object
Load has_slug if the gem is included.
Class Method Details
.enable ⇒ Object
Load has_slug if the gem is included
17 18 19 20 21 |
# File 'lib/has_slug.rb', line 17 def self.enable return if ActiveRecord::Base.methods.include? 'has_slug' ActiveRecord::Base.class_eval { extend HasSlug::ClassMethods } end |