You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I use your gem with friendly-id and globalize (last versions) in a Rails 4.2.5 application. I need to update slug every time a user modify the attribute name.
When I use update action in my controller slug is not regenerated because slug is not nil in translations. I check the code and I realize that the method used to update slug is :
Good catch @ldonnet . Just a note: The general solution would be translation_for(::Globalize.locale).send(friendly_id_config.slug_column).blank? instead of slug.blank? .
Hi, I use your gem with friendly-id and globalize (last versions) in a Rails 4.2.5 application. I need to update slug every time a user modify the attribute name.
Model :
When I use update action in my controller slug is not regenerated because slug is not nil in translations. I check the code and I realize that the method used to update slug is :
How can I manage to set slug attributes to nil?
I try :
I go further and discover that the object instance in should_generate_new_friendly_id? seems to be the old one not the one which is updated.
Is there a classic way to do this?
The text was updated successfully, but these errors were encountered: