Groups
Groups
Sign in
Groups
Groups
Ruby on Rails: Talk
Conversations
About
Send feedback
Help
routes for new resources
11 views
Skip to first unread message
John Merlino
unread,
Aug 17, 2012, 11:32:02 AM
8/17/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Does anyone know what the controller code would look like for a route
like this:
resources :reports do
new do
post :preview
end
end
and a helper that looks like this:
preview_new_report_path
thanks for response
John Merlino
unread,
Aug 17, 2012, 11:38:38 AM
8/17/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
actually, let me rephrase this. That route points to the preview
action of a reports controller, but why is it a POST for a new
resource?
bertly_the_coder
unread,
Aug 18, 2012, 3:53:42 PM
8/18/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
Hey John, Haven't you defined it as a POST in this line?
post :preview
Reply all
Reply to author
Forward
0 new messages