Hello
Im new to rails and Ive been going through Curts article on OnLamp...  
So I wanted to use map.connect in my routes file to point to /recipe/ 
list (in case anyones familiar with the article)... So anyway I think  
its choking because the list.rhtml contains id''s... Ive copied the  
error I get below... Im using apache2 with rails (0.11.1) and ruby  
1.8.2.
in my routes.rb:
map.connect '''', :controller => ''recipe'',
:action => ''list'', :title =>
''Welcome''
Error:
ActionController::RoutingError in Recipe#list
Showing /recipe/list.rhtml where line #18 raised Generation failure:  
No route for url_options  
{:id=>1, :controller=>"recipe", :action=>"show"},
defaults:
{:controller=>"recipe", :title=>"Welcome",
:action=>"list"}
15:
16:  <% @recipes.each do |recipe| %>
17:   <tr>
18:    <td><%= link_to recipe.title, :action => "show",
:id =>
recipe.id %></td>
19:    <td><%= recipe.category.name %></td>
20:     <td><%= textilize(recipe.description) %></td>
21:    <td><%= recipe.date %></td>
Any help is appreciated...
Thanks
Eoghan
On 7/12/05, eoghan <rails-JPH02XhdevJeoWH0uzbU5w@public.gmane.org> wrote:> Hello > Im new to rails and Ive been going through Curts article on OnLamp... > So I wanted to use map.connect in my routes file to point to /recipe/ > list (in case anyones familiar with the article)... So anyway I think > its choking because the list.rhtml contains id''s... Ive copied the > error I get below... Im using apache2 with rails (0.11.1) and ruby > 1.8.2. > > in my routes.rb: > map.connect '''', :controller => ''recipe'', :action => ''list'', :title => > ''Welcome'' > > Error: > ActionController::RoutingError in Recipe#list > Showing /recipe/list.rhtml where line #18 raised Generation failure: > No route for url_options > {:id=>1, :controller=>"recipe", :action=>"show"}, defaults: > {:controller=>"recipe", :title=>"Welcome", :action=>"list"} > > 15: > 16: <% @recipes.each do |recipe| %> > 17: <tr> > 18: <td><%= link_to recipe.title, :action => "show", :id => > recipe.id %></td> > 19: <td><%= recipe.category.name %></td> > 20: <td><%= textilize(recipe.description) %></td> > 21: <td><%= recipe.date %></td>You actually need something to connect to. Try something like: map.connect '':controller/:action/:id'', :controller => ''recipe'', :action => ''list'', :title => ''Welcome'', :id => nil -- rick http://techno-weenie.net
On 12 Jul 2005, at 21:21, Rick Olson wrote:> You actually need something to connect to. Try something like: > > map.connect '':controller/:action/:id'', :controller => ''recipe'', > :action => ''list'', :title => ''Welcome'', :id => nilah, sorry. Newbie mistake. Thanks very much Rick. Eoghan