Created
July 2, 2014 06:36
-
-
Save harshamv/0ee8fbf8bb415128a498 to your computer and use it in GitHub Desktop.
Friendly_id smaller conflict slug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# over writing the conflict slug | |
module FriendlyId | |
module Slugged | |
def resolve_friendly_id_conflict(candidates) | |
candidates.first + friendly_id_config.sequence_separator + SecureRandom.hex(3) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment