Module FriendlyId::Base
In: lib/friendly_id.rb

Methods

Public Instance methods

Set up a model to use a friendly_id. This method accepts a hash with {FriendlyId::Configuration several possible options}.

@param [to_sym] method The column or method that should be used as the

  basis of the friendly_id string.

@param [Hash] options For valid configuration options, see

  {FriendlyId::Configuration}.

@param [block] block An optional block through which to filter the

  friendly_id text; see {FriendlyId::Configuration#normalizer}. Note that
  passing a block parameter is now deprecated and will be removed
  from FriendlyId 3.0.

@example

  class User < ActiveRecord::Base
    has_friendly_id :user_name
  end

  class Post < ActiveRecord::Base
    has_friendly_id :title, :use_slug => true, :approximate_ascii => true
  end

@see FriendlyId::Configuration

Does the model class use the FriendlyId plugin?

[Validate]