Module: FriendlyId::Globalize::Model

Defined in:
lib/friendly_id/globalize.rb

Instance Method Summary collapse

Instance Method Details

#set_friendly_id(text, locale) ⇒ Object



79
80
81
82
83
# File 'lib/friendly_id/globalize.rb', line 79

def set_friendly_id(text, locale)
  I18n.with_locale(locale || I18n.locale) do
    set_slug(normalize_friendly_id(text))
  end
end