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.
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.
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/.
Read this http://eviltrout.com/2013/02/10/why-discourse-uses-emberjs.html and use Ember :)
+1, Emblem.js is awesome!
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?
Won't this result in n+1 problems, where you're doing a query for each answer?
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.
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 tohttp://unicorn/posts
, instead ofhttp://example.com/posts
. What could've I missed?Even if I do just
redirect_to '/'
, I get redirected tohttp://unicorn/
.