0

I want to use '@' before the link in friendly_id I have username and I am saving username in database with '@' symbol. Its working correctly. But Friendly_id is showing

example.com/username

and I want

example.com/@username

How can I do that ?

Adt
  • 495
  • 6
  • 19

1 Answers1

0

we can do it by overwriting normalize_friendly_id method

def normalize_friendly_id(string)
    super.insert(0, '@')
end
Adt
  • 495
  • 6
  • 19