-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Description
Hi,
It seems that post's slug is not generated when save/update.
I'm using
gem 'refinerycms', '~> 4.0'
gem 'refinerycms-blog', git: 'https://github.com/refinery/refinerycms-blog', branch: 'master'
It might be that this one returns always false:
# If custom_url or title changes tell friendly_id to regenerate slug when
# saving record
def should_generate_new_friendly_id?
saved_change_to_attribute?(:custom_url) || saved_change_to_attribute?(:title)
end
I had forced this method to always return false and the slug/friendly_id is generated. So it might be that those attributes are not seen as saved.
I have changed to
attribute_changed?(:custom_url) || attribute_changed?(:title)
and it returns correctly the state of attribute changes. I wonder if is not a Rails 5.1 issue?
thank you
Ionut
Metadata
Metadata
Assignees
Labels
No labels