"No route matches" for model named "News" #89

masv opened this Issue May 24, 2011 · 10 comments


None yet

8 participants

masv commented May 24, 2011

Using ActiveAdmin for a model called "News" seems to not work properly. After creating a resource for the News model, visiting any ActiveAdmin page will raise an error such as this:

ActionController::RoutingError in Admin/dashboard#index
Showing /Library/Ruby/Gems/1.8/gems/activeadmin-0.2.1/lib/active_admin/views/templates/active_admin_dashboard/index.html.arb where line #1 raised:
No route matches {:action=>"show", :controller=>"admin/news"}

However, when renaming the resource with :as (to "Post", "Gherkin", or anything else that can be pluralized), the model and all views behave as expected.

The same error occurs when renaming any other model to "News" using :as, for example:

ActiveAdmin.register Post, :as => "News" do

Can you do a rake routes in your app and post the output.

masv commented May 24, 2011

rake routes with model named News:

admin_news_index GET    /admin/news(.:format)              {:action=>"index", :controller=>"admin/news"}
                 POST   /admin/news(.:format)              {:action=>"create", :controller=>"admin/news"}
  new_admin_news GET    /admin/news/new(.:format)          {:action=>"new", :controller=>"admin/news"}
 edit_admin_news GET    /admin/news/:id/edit(.:format)     {:action=>"edit", :controller=>"admin/news"}
      admin_news GET    /admin/news/:id(.:format)          {:action=>"show", :controller=>"admin/news"}
                 PUT    /admin/news/:id(.:format)          {:action=>"update", :controller=>"admin/news"}
                 DELETE /admin/news/:id(.:format)          {:action=>"destroy", :controller=>"admin/news"}

(Sorry for the formatting...)


Yep, the same for me. Everything works as expected except "News" resource, and I have all necessary routes.

@gregbell gregbell closed this Jul 18, 2011
ecleel commented Aug 13, 2011

issue still doesn't solve and the problem from active_admin itself not from rails because I create a rails project as a test and create news scaffold and It worked. but it didn't work in active_admin


I am also having issues with this. I have a model named Series and I get a similar error message.

pcreux commented Aug 18, 2011

See issue #369.

ecleel commented Aug 18, 2011

Thanks pcreux. I hope will be fixed soon


This should be closed by aafde51 as referenced in Issue #369

I got this error as well and all I needed to do was to restart the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment