random52k-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Oct-12 03:04 UTC
Strange routing problems with edge rails
Just upgraded to edge rails to use the BigDecimal support, but I''m
running into the following error:
content_list_faq_url failed to generate from {:action=>"list_faq",
:controller=>"content"}, expected:
{:action=>"list_faq",
:controller=>"content"}, diff: {}
my routes file has the following:
map.with_options(:controller => ''content'') do |content|
content.content_list_faq
''content/faq/list/:section'',
:action => ''list_faq''
end
map.connect '':controller/:action/:id''
the line that''s causing this is: <%= link_to(''FAQ
Management'',
content_list_faq_url) %>
I was previously using namespaces for my controllers, but stopped after
reading that it''s not a good idea and doesn''t work with edge
rails, but
I''m still getting the above strange error.. If I switch back to regular
rails, the error is gone.. Also, if I change the route from
"content/faq/list/:section" to "content/faq/list/:id", it
works fine..
Also, if I use "content_list_faq_url(:section =>
''whatever'')" it also
works. Anyone have any ideas? Thanks,
Mike
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---
On 10/11/06, random52k-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <random52k-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Just upgraded to edge rails to use the BigDecimal support, but I''m > running into the following error: > > content_list_faq_url failed to generate from {:action=>"list_faq", > :controller=>"content"}, expected: {:action=>"list_faq", > :controller=>"content"}, diff: {} > > my routes file has the following: > > map.with_options(:controller => ''content'') do |content| > > > content.content_list_faq ''content/faq/list/:section'', > :action => ''list_faq'' > end > > map.connect '':controller/:action/:id'' > > the line that''s causing this is: <%= link_to(''FAQ Management'', > content_list_faq_url) %> > > I was previously using namespaces for my controllers, but stopped after > reading that it''s not a good idea and doesn''t work with edge rails, but > I''m still getting the above strange error.. If I switch back to regular > rails, the error is gone.. Also, if I change the route from > "content/faq/list/:section" to "content/faq/list/:id", it works fine.. > Also, if I use "content_list_faq_url(:section => ''whatever'')" it also > works. Anyone have any ideas? Thanks, > > Mike:section is required. Try this: content.content_list_faq ''content/faq/list/:section'', :action => ''list_faq'', :section => nil -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---