Displaying 1 result from an estimated 1 matches for "controllerclassname".
Did you mean:
controller_class_name
2006 Jul 24
1
Injecting actions into controllers
Hi,
I''m trying to write a plugin that should inject an action into the controller.
Please note, not just an instance method, but also an _action_, one of those
that are listable by running ControllerClassName.action_methods.
I wrote the following code:
def render_field_search(name, object, controller, options = {})
controller.class.class_eval do
define_method("#{name}_flt") {
raise ''Here iam!''
}
end
# this should define the new method as an action too...