> Hey everyone, Hey David, > <p class="right"> > <%= link_to 'Approve', post, :action => 'approve', :id => post %> | > <%= link_to 'Disapprove', post, :action => 'disapprove', :id => post %> > | > <%= link_to 'Edit', edit_post_path(post) %> | > <%= link_to 'Delete', post, :confirm => 'Are you sure?', :method => > :delete %> > </p>
A couple of things: 1) Your resource is configured to only accept put method type and your links appear to be get. 2) In the link_to its self I would use: <%= link_to 'Disapprove', disapprove_post_path(post), :method => 'put' %> Notice that I added the method and am now using the route helpers? There is more to talk about the approach, but you'll get it working with those two changes. Paul > And in my routes.rb: > > ... > map.resource :posts, :member => { > :approve => :put, > :disapprove => :put > } > ... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.