Re: Ubuntu & Rails, can''t get it to work

comopasta Gr
Fri, 14 Mar 2008 15:09:19 -0000

>> <%= link_to ''Edit'',
:controller=>"coches", :action=>"edit", :id=>coches
>
> shouldn''t that be coches.id?

Hi, thanks for the comments. Well I didn''t play that much with it.

The bottom line is that the original line created by scaffold:

<%= link_to ''Edit'', edit_coches_path(coches) %>
causes errors when you try to fetch the index page

but

<%= link_to ''Edit'', :controller=>"coches",
:action=>"edit", :id=>coches
%>
goes through ok and displays all the entries in the db for coches

So the problem is that the first line uses edit_coches_path(coches) and
the second uses :controller and :action directly.

The original one is how Rails 2.0 is generating everything so I don''t
want to use the old way. There must be a fix somehow.

Cheers!
--
Posted via http://www.ruby-forum.com/.