Am i doing something wrong ? on Record update, slug is not being updated.
class Company < ActiveRecord::Base
extend FriendlyId
friendly_id :name, use: [:slugged, :finders]
def should_generate_new_friendly_id?
true
end
I'm using:
friendly_id (5.0.4)
Rails 4.1.7
ruby 2.1.3p242 (2014-09-19 revision 47630)
This is how I'm trying in terminal:
c = Company.last
c.slug = nil
c.name = "testing abb"
c.save
c.reload
c.slug // nil
c.name // testing abb
at the time of create: it inserts the slug but doesnt update on record update. any idea ?