i can add action links in any place? for example on create tamplate? 2009/1/13 muhammad nadeem akram <[email protected]>: > > use this in ur controller > config.action_links.add 'reports', :label => 'Reports' > > and then there is no need to add any thing in routs.rb > > > On Tue, Jan 13, 2009 at 1:24 PM, Sergio Cambra .:: entreCables - Symbol > Servicios Informáticos S.L. ::. <[email protected]> wrote: >> >> 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 -~----------~----~----~----~------~----~------~--~---
