Generic-user-small Dominic Amann 2 posts

I have tried the DRY forms example, but I am stumped at an error. Voucher is a simple table with the text field “test” in it.

undefined method `vouchers_path’ for #<actionview::base:0xf6ff6a6c>

Extracted source (around line #2):

1:
2: <% error_handling_form_for(@voucher) do |f| ->
3: <
= f.text_field :test >
4: <
end %>

Any clues?

btw, percent signs are disappearing in my post – they are there until I hit ‘save changes’.

 
Mike-120_small Mike Clark Administrator 35 posts

Hi Dominic,

The vouchers_path method comes from the RESTful routing conventions. You’ll need to make sure you have the following line in your config/routes.rb file:

map.resources :vouchers

Hope that helps.

Mike

2 posts, 2 voices