Thursday, 26 April 2012

About Heroku to remember

uid = String
friend = User.find_by_uid(id)
Will not work
#LINE 1: ...LECT "users".* FROM "users" WHERE ("users"."uid" = blah) ...
#2012-04-26T20:00:16+00:00 app[web.1]: ^
#2012-04-26T20:00:16+00:00 app[web.1]: HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
#2012-04-26T20:00:16+00:00 app[web.1]: 43: # OR User.find_by_uid(list) but maybe list is too big? I have to find MAX find args
#2012-04-26T20:00:16+00:00 app[web.1]: : SELECT "users".* FROM "users" WHERE ("users"."uid" = blah) LIMIT 1):
friend = User.find_by_uid(id.to_s)
# will work
#Heroku raise an exeption if is NOT a string
#Local development may work but not in Herolu
view raw gistfile1.rb hosted with ❤ by GitHub

No comments:

Post a Comment