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
{{ message }}
This repository was archived by the owner on Feb 5, 2019. It is now read-only.
Slug.transaction do
slugs.update_all(active: false)
slugs.where(slug: valid_slugs_in_use.first).update_all(active: true)
end
return
if the scope isn't already in the record, it does not seem to get saved. A new slug is not generated either.
all I did to fix it is the following in your code.
Slug.transaction do
slugs.update_all(active: false)
slugs.where(slug: valid_slugs_in_use.first).update_all(
active: true,
scope: self.class._slug_scope.try(:call, self))
end
return