norman/friendly_id-globalize

updating slugs using self.set_friendly_id t.title, t.locale

mugwump opened this issue · 0 comments

I'm using slugged together with friendly_id-globalize on my model:

extend FriendlyId
friendly_id :title, :use => [:globalize, :slugged]

The initial generation of the slug works fine, but when I try to update my slugs when the title has changed with:

    self.translations.each do |t|
      t.slug = self.set_friendly_id t.title, t.locale
    end

I get a:

NoMethodError: undefined method `set_friendly_id'

Is there a better, or at least a working way to handle slug-updates?! I've migrated from an earlier version of friendly_id where this approach worked, but as the docs haven't changed on I assumed that this should still be working...