Aaron S. wrote:
Does anyone know if there is a method to execute a target method on a
controller, through the filter logic.
Say I want to execute the “list” method, but first have it go through
the all the filter logic. Is there a method on ActionController::Filters
to do this?
I’m developing a rails plugin and I need to hijack the filter chain. I
load a Controller dynamically and need to be able to execute the filter
@clazz = Object.const_get(‘MyController’)
@clazz.filter_chain.each do |filter|
res = filter.call(@clazz, ?)
So I’m wondering if looping through the filter_chain is the best way to
do this? Is there a method to handle this for me? I don’t really see one
in the source, but maybe somebody knows how…