rails link path and routing error

Posted by Nick5a1 on Stack Overflow See other posts from Stack Overflow or by Nick5a1
Published on 2012-07-07T02:23:12Z Indexed on 2012/07/07 9:16 UTC
Read the original article Hit count: 190

<%= link_to t('.new', :default => t("helpers.links.new")), new_equipment_path, :class => 'btn btn-primary' %>

I have the above code in a view, but am getting the following error when clicking the link: No route matches {:action=>"show", :controller=>"equipment"}

My routes file contains:

devise_for :users

ActiveAdmin.routes(self)

devise_for :admin_users, ActiveAdmin::Devise.config

resources :equipment

resources :workouts

root :to => "home#index"
match 'workouts/random', :to => 'workouts#random'

match ':controller(/:action(/:id))(.:format)'

Why is it trying to access the show action?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails-3