Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Jakub Arnold's Profile

GitHub User: darthdeus

Site: http://progfu.com/

Comments by Jakub Arnold

Avatar

I was actually looking for a solution how to eagerly-load if the user voted on the answer, so that I can display a list of answers and tell if the user voted on them without doing the additional query.

I guess this could be done with some joins, but I wasn't able to do it with the activerecord-reputation-system.

Did anyone manage to do this?

Avatar

Won't this result in n+1 problems, where you're doing a query for each answer?

Avatar

I don't know what happened, but restarting nginx and unicorn multiple seems to have solved the problem and it hasn't reappeared yet. I still wonder what caused it though.

Avatar

Hey, I'm having trouble with redirecting. I have the same nginx.conf as in the tutorial, and when I do redirect_to posts_path in my controller, I get redirected to http://unicorn/posts, instead of http://example.com/posts. What could've I missed?

Even if I do just redirect_to '/', I get redirected to http://unicorn/.