You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the default (generated) controllers, show operation does not work.
The sql generated is the following:
SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "84857d86-9700-4bc2-b934-63ffedd76bee"]]
But the working one is:
SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "\x84\x85}\x86\x97\x00K\xC2\xB94c\xFF\xED\xD7k\xEE"]]
I've solved the problem modifing the set method on the controller, to ensure String is used
def set_post @post = Post.find(params[:id].to_s)
end
The text was updated successfully, but these errors were encountered:
I'm using Rails 4.1.6 on sqlite3.
On the default (generated) controllers, show operation does not work.
The sql generated is the following:
SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "84857d86-9700-4bc2-b934-63ffedd76bee"]]
But the working one is:
SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", "\x84\x85}\x86\x97\x00K\xC2\xB94c\xFF\xED\xD7k\xEE"]]
I've solved the problem modifing the set method on the controller, to ensure String is used
def set_post
@post = Post.find(params[:id].to_s)
end
The text was updated successfully, but these errors were encountered: