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 <[email protected]> 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
> [email protected]
> http://rubyforge.org/mailman/listinfo/camping-list
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list