yo. creating first plugin.
Is it not possible to create a plugin that defines controller actions?
<code>
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):"
</code>
but the following *will* work:
<code>
def ApplicationController < ActionController::Base
include Foo
end
.
.
.
http://url:3000/controller/on_callback
''foo''
</code>
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---