Am I right thinking that aspect blocks are not inherited, and you can
only have one of each type?
I wanted to do this:
class Controller < Ramaze::Controller
before_all do
# before all actions in the app
end
end
class FirstController < Controller
before_all do
# have the app stuff from Controller run, then...
# before all actions in this specific controller
end
end
but it does not appear possible. Is there a way to achieve cascading
before blocks?
Cheers
Ashley
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/
> class Controller < Ramaze::Controller
> before_all do
> before_filter
> end
>
> def before_filter
> # before all actions in the app
> end
> end
>
> class FirstController < Controller
> def before_filter
> super
> # before all actions in this specific controller
> end
> end
Thanks hrnt
Is this documented? If not, I'll find a space to put it on the wiki
when Michael has signed me up.
I think it's less than ideal though. Two possible improvements spring
to mind:
* allow building up a list of blocks (like RSpec)
* warn when a block is being overridden from a parent class
WDYT? Worth filing a ticked for?