Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#dup with unslugged model causes undefined method error
In lib/friendly_id/base.rb:252: ``` def dup super.tap { |duplicate| duplicate.slug = nil } end ``` However, suppose we have a User with just `friendly_id :login` - no extra slug. #slug= is not defined, and therefore some_user.dup fails. My patch just makes the dup check if slug= is defined before using it.
- Loading branch information