0

I am trying to add a customer action to one of my resources, therefore I created a custom route:

namespace :admin do
  resources :subscriptions

  match 'subscriptions/summary', :to => 'subscriptions#summary', :as => 'subscriptions_summary'

end

In my rake routes I'm getting the following output:

admin_subscriptions_summary        /admin/subscriptions/summary(.:format)                               spree/admin/subscriptions#summary

The problem now is, whenever I try to create a link to the summary action, I get following error:

Missing template spree/admin/subscriptions/show

Why is my app confusing the show action with the summary action?

4

1 に答える 1

0
namespace :admin do
  resources :subscriptions do
    collection do 
      get 'summary'
    end
  end
end

それを解決しました。

于 2012-12-27T01:06:40.607 に答える