Skip to content

Instantly share code, notes, and snippets.

@harshamv
Created July 2, 2014 06:36
Show Gist options
  • Save harshamv/0ee8fbf8bb415128a498 to your computer and use it in GitHub Desktop.
Save harshamv/0ee8fbf8bb415128a498 to your computer and use it in GitHub Desktop.
Friendly_id smaller conflict slug
# 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