You might consider adding an inflection for news in your config/ 
initializers/inflections.rb. That will tell Rails that the plural of  
news is news. There are examples in the Rails-generated file.


On Jul 20, 2009, at 12:00 PM, elliottg wrote:

>
> I have been using this namespaced form_for syntax with no problems:
>  <% form_for [:admin, @products] do |f| %>
>
> However, now that I am working with a model and controller called
> "news" which has no differentiation between singular and plural...
>
>  <% form_for [:admin, @news] do |f| %>
>
> ... I am getting this exception when running my tests:
>
>
> ActionView::TemplateError: admin_news_url failed to generate from
> {:controller=>"adminl/news", :action=>"show"} - you may have ambiguous
> routes, or you may need to supply additional parameters for this
> route.  content_url has the following required parameters: ["admin",
> "news", :id] - are they all satisfied?
>
>
> Rake Routes is showing me that I can get news#index via
> sitecontrol_news_index.
>
> I just can't figure out the syntax to make it all work within the
> admin namespacing context.
>
> Thanks for the help.
> Elliott
> >


--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to