Module: FriendlyId::SimpleI18n::Model

Defined in:
lib/friendly_id/simple_i18n.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) set_friendly_id(text, locale = nil)



87
88
89
90
91
# File 'lib/friendly_id/simple_i18n.rb', line 87

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

- (Object) slug=(value)



93
94
95
96
# File 'lib/friendly_id/simple_i18n.rb', line 93

def slug=(value)
  super
  write_attribute friendly_id_config.slug_column, value
end