lib/friendly_id.rb
def friendly_id_base
        base = self.send(friendly_id_options[:method].to_sym)
        if base.blank?
          raise SlugGenerationError.new("The method or column used as the base of friendly_id's slug text returned a blank value")
        end
        if self.friendly_id_options[:strip_diacritics]
          Slug::normalize(Slug::strip_diacritics(base))
        else
          Slug::normalize(base)
        end
      end
# Get the string used as the basis of the friendly id. If you set the
# option to remove diacritics from the friendly id's then they will be
# removed.
Get the string used as the basis of the friendly id. If you set the
option to remove diacritics from the friendly id's then they will be
removed.
Get the string used as the basis of the friendly id . If you set the option to remove diacritics from the friendly id ' s then they will be removed .
def friendly_id_base
        base = self.send(friendly_id_options[:method].to_sym)
        if base.blank?
          raise SlugGenerationError.new("The method or column used as the base of friendly_id's slug text returned a blank value")
        end
        if self.friendly_id_options[:strip_diacritics]
          Slug::normalize(Slug::strip_diacritics(base))
        else
          Slug::normalize(base)
        end
      end
def friendly_id_base base = self . send ( friendly_id_options [ :method ] . to_sym ) if base . blank? raise SlugGenerationError . new ( "The method or column used as the base of friendly_id's slug text returned a blank value" ) end if self . friendly_id_options [ :strip_diacritics ] Slug :: normalize ( Slug :: strip_diacritics ( base ) ) else Slug :: normalize ( base ) end end
Get the string used as the basis of the friendly id.
Get the string used as the basis of the friendly id .