Module: Sequel::Plugins::FriendlyId

Defined in:
lib/friendly_id_sequel.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.configure(model, method, opts = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/friendly_id_sequel.rb', line 12

def self.configure(model, method, opts={})
  model.instance_eval do
    if friendly_id_config.use_slug?
      require File.join(File.dirname(__FILE__), "friendly_id", "sequel_adapter", "slug")
      include ::FriendlyId::SequelAdapter::SluggedModel
    else
      include ::FriendlyId::SequelAdapter::SimpleModel
    end
  end
end