El Monday 12 January 2009 22:07:51 Mark Sim escribió:
> 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 are linking to REPORT action instead of REPORTS.


-- 
Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

  • Ho... Mark Sim
    • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.
      • ... muhammad nadeem akram
        • ... Vinicius Gati
      • ... Mark Sim
        • ... Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::.

Reply via email to