Re: controller from plugin not working

heithem nouira
Thu, 26 May 2011 14:42:00 -0000

sorry, i maked a mistake, you should put the configurations in vendor/
plugins/buoy_report/lib/buoy_report.rb instead of:
vendor/plugins/buoy_report/lib/buoy_station.rb


concerning route , why don''t put map.resources :buoy_station in the
main routes file?



On May 26, 2:16 pm, Jedrin
<jrubia...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> Thanks alot.
>
> I went through this whole thing like below, was that unnecessary ?
>
> module BuoyReport #:nodoc:
>   module Routing #:nodoc:
>     module MapperExtensions
>       def buoy_reports
>         @set.add_route("/buoy_report", {:controller =>
> "buoy_reports", :action => "index"})
>       end
>     end
>   end
> end
>
> ActionController::Routing::RouteSet::Mapper.send :include,
> BuoyReport::Routing::MapperExtensions