I have the friendly_id gem installed (version 5.1.0) and have implemented the steps in the documentation to extend my model, add the slug field to the table, etc. This url works as expected:
http://localhost:3000/owners/1
I'm trying to find by email address but look how the trailing .com is being treated:
http://localhost:3000/owners/me@example.com
{"id"=>"me@example",
"format"=>"com"}
And since my client is really looking to receive the results of the find in json format, the client should be sending this URL to the server:
http://localhost:3000/me@example.com.json
but Rails doesn't like that:
No route matches [GET] "/owners/me@example.com.json"
where as
http://localhost:3000/owners/1.json
returns the json view as expected.
How (or what) should I code to get around this?