-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
On this line https://github.com/olkarls/has_permalink/blob/master/lib/has_permalink.rb#L56 the permalink searches for itself so if you update a model, it always appends a number which isn't correct. Instead the 'where' clause should tell it to not count it's own ID
n = self.class.where(["permalink = ? AND id != ?", permalink, id]).count
Metadata
Metadata
Assignees
Labels
No labels