Skip to content

Commit

Permalink
Update slug.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed Apr 21, 2024
1 parent 868af28 commit 65fc38e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/slug.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def new_with_slugs?
def persisted_with_slug_changes?
if localized?
changes = _slugs_change
return (persisted? && false) if changes.nil?
return false if changes.nil?

# ensure we check for changes only between the same locale
original = changes.first.try(:fetch, I18n.locale.to_s, nil)
Expand Down

0 comments on commit 65fc38e

Please sign in to comment.