views:

34

answers:

1

When I go to .. www.website.com/admin/organizations/org_deals , I get :

Missing template admin/organizations/show.erb in view path

My routes.rb :

map.namespace :admin do |admin|
  admin.napespace :organizations do |organization|
    organization.org_deals 'org_deals', :action => 'org_deals', :member => {org_deals => :get}
  end
end

In my rake routes :

 admin_organizations_org_deals        
/admin/organizations/org_deals
{:controller=>"admin/organizations/", :action=>"org_deals", :member=>{:org_deals=>:get}}

And last but not least. My file is in the directory :

/admin/organizations/org_deals.html.haml

But my app desperately wants a 'show'. How can I tell it, "no, no, no, what you really want is an org_deals, silly."

Thanks!

A: 

The :member key is reserved for using resources, it looks like it is expecting it as a parameter and is causing the route to not match and then to match to something else down the way. I think if you remove the :member key, it will work.

map.namespace :admin do |admin|
  admin.napespace :organizations do |organization|
    organization.org_deals 'org_deals', :action => 'org_deals'
  end
end
Geoff Lanotte