RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: ACPK
To work with the gem's latest update, you have to change the line:
How do I setup multiple environments in the .ENV file?
Found the issue which was that it an edit needs to be made for it to work with existing entries on Heroku :)
Friendly_ID was working for me before I edited by After editing the _add_slug_to_users.rb file then ran the command User.find_each(&:save)
For each user, I got an error that was similar to:
User Load (0.3ms) SELECT "users".* FROM "users" WHERE ("slug" = 'carleton-howell' OR "slug" LIKE 'carleton-howell--%'ESCAPE '\') AND (id <> 2) ORDER BY LENGTH("slug") DESC, "slug" DESC LIMIT 1
User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE (LOWER("users"."email") = LOWER('email@example.com') AND "users"."id" != 2) LIMIT 1
(0.1ms) rollback transaction