On Sun, 2007-09-16 at 01:31 -0700, 大师傅 wrote:> I''m coding with a Rails plugin, which need to extend
ActionController
> so that action callback can be made when a view-generated hyper-link
> is clicked.
>
> But when i wrote some code like these:
>
> module MyController
> def callback_action()
> @origin_page=''''
> p params
> redirect_to :action=>:index
> end
> end
>
> and wrote these in init.rb:
>
> ActionController::Base.send(:include, MyController)
>
> Rails seemed not knowing this callback_action method ( '' unknown
> action callback_action in xxx'')
>
> why? So , what should I do to extend the fucking
> ActionController::Base ?
>
> help me!
>
>
> >
do you have a real MyController class.
not a module
if you have both MyController Module And MyController Class.
may not work correct.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---