SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Nov 2010
    0 Post(s)
    0 Thread(s)

    Simply Rails 2 Page 222 Undefined Method


    I'm using the highly recommended "Simply Rails 2" book with rails 3, so I've been running into problems here and there I've been able to work out for myself so far. But today I've hit a problem I can't find help with....

    On page 222, there's a bit about adding some code to the webpage to show a "shove it!" button. The code that's giving me a problem is the following in the app/views/stories/show.html.erb file:

    Code HTML4Strict:
    <div id ="vote_form">
    	<% form_remote_tag :url => story_votes_path(@story) do %>
    		<%= submit_tag 'shove it' %>
    	<% end %>

    The error I'm getting is "undefined method `story_votes_path' for #<#<Class:0x210fe6c>:0x210d93c>"

    I've tried everything and I'm totally stuck. Thanks.
    Last edited by descarte; Mar 7, 2011 at 08:44.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts