You can override #service:
module App
def service(*args)
p({:controller => self.class, :method => @method, :args => args})
p :before
super
ensure
p :after
end
end
// Magnus Holm
On Sat, Apr 7, 2012 at 18:11, Nokan Emiro <uzleepito at gmail.com>
wrote:> Hi,
>
> What''s the nice and preferred way to run a snippet of controller
code
> before?all other normal controllers can do something?
>
>
> _______________________________________________
> Camping-list mailing list
> Camping-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/camping-list