A plugin that responds to an action


yo. creating first plugin.
Is it not possible to create a plugin that defines controller actions?

module Foo def on_callback render_text 'foo', :layout => false end end ActionController::Base.send(:include, Foo) . . . http://url:3000/controller/on_callback "ActionController::UnknownAction (No action responded to on_callback):"

but the following will work:

def ApplicationController < ActionController::Base
include Foo


I found the answer to my question here

see “un-hiding actions” at bottom of page.