I am trying to figure out how to structure my path in the link_to_remote tag to accommodate nested routes. I have an article model that relates to a group model, and the article has votes associated with it (using the Vote_Fu plugin). At first I created the code for the articles, and it worked, but in the process of adding a group model and updating my paths for everything, the link below is now broken. I know that he is looking for new_question_path, which will no longer work, but I cannot figure out what to replace it with.
<%= link_to_remote "+(#{@article.votes_for})",
:update=>"vote",
:url => { :controller=>"articles",
:action=>"vote",
:id=>@article.id,
:vote=>"for"},
:html => { :class => "up" } %>
Any help would be awesome. Thank!
UPDATE:
Looks like the problem was in my routes. I have a voting method in my article controller, but he did not know what to look for. I changed the routes.rb file to this:
group.resources :articles, :member => { :vote => :get }
It looks like the problem can be solved.