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
end
.
.
.
http://url:3000/controller/on_callback
‘foo’