module FriendlyId::ActiveRecord2
The adapter for Ruby on Rails's ActiveRecord. Compatible with AR 2.2.x - 2.3.x.
Public Instance Methods
has_friendly_id(method, options = {}, &block)
click to toggle source
# File lib/friendly_id/active_record2.rb, line 14 def has_friendly_id(method, options = {}, &block) class_inheritable_accessor :friendly_id_config write_inheritable_attribute :friendly_id_config, Configuration.new(self, method, options.merge(:normalizer => block)) if friendly_id_config.use_slug? include SluggedModel else include SimpleModel end end