Displaying 2 results from an estimated 2 matches for "equipment_inst".
2009 Jul 01
1
form_for resources with :singular specified
I fully suspect that I''m missing the point here somewhere so I promise
I won''t be offended if you tell me I''m being daft.
My application rents equipment ... not equipments. So I have the
following:
map.resources :equipment, :singular => :equipment_instance
class Equipment < ActiveRecord::Base
class EquipmentController < 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.
(Act...
2008 May 29
2
Resource routing error with the route equipment/new
...t )
end
Inflector.inflections do |inflect|
inflect.irregular ''equipment'', ''equipment''
end
--
I also tried changing routes.rb to the following, which caused
equipment/new to work but the other three routes to fail ..
map.resources :equipment, :singular => :equipment_instance
--
Any ideas on what could be happening?
THANKS!
- Dave
--
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, se...