Displaying 1 result from an estimated 1 matches for "equipment_instance_path".
2009 Jul 01
1
form_for resources with :singular specified
...er < ApplicationController
The problem comes in my _form.haml partial that is used by new.haml
and edit.haml:
- form_for @equipment do |f|
This gives me an error saying "Only get and post requests are allowed.
(ActionController::MethodNotAllowed)"
I tried:
- form_for @equipment, equipment_instance_path(@equipment) do |f|
That gives the same error.
There has to be something better than:
- form_for @equipment, :url => (@equipment.new_record? ?
equipment_path : equipment_instance_path(@equipment)), :html =>
(@equipment.new_record? ? { :method => :post } : { :method => :put })
do |f|...