When I do this
app/controllers/advertisers_controller.rb
class AdvertisersController < ApplicationController
active_scaffold :advertiser do |config|
...
config.action_links.add 'report', :label => 'Report'
end
def reports
item = Advertiser.find(params[:id])
redirect_to :controller => 'reports', :code => item.code
end
end
in routes.rb
...
map.resources :advertisers, :member => {:reports
=> :get}, :active_scaffold => true
...
I get:
No route matches
{:controller=>"advertisers", :_method=>:get, :action=>"report"}
ideas? How do I get my custom actions to be recognized as routes?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---