lib/ardb/has_slug.rb in ardb-0.26.0 vs lib/ardb/has_slug.rb in ardb-0.27.0
- old
+ new
@@ -1,20 +1,21 @@
+require 'much-plugin'
+
module Ardb
module HasSlug
+ include MuchPlugin
DEFAULT_ATTRIBUTE = :slug
DEFAULT_PREPROCESSOR = :downcase
DEFAULT_SEPARATOR = '-'.freeze
- def self.included(klass)
- klass.class_eval do
- extend ClassMethods
- include InstanceMethods
+ plugin_included do
+ extend ClassMethods
+ include InstanceMethods
- @ardb_has_slug_config = {}
+ @ardb_has_slug_config = {}
- end
end
module ClassMethods
def has_slug(options = nil)