def exeRedirect (options={}) params.merge!(options) c = ActionController.const_get(Inflector.classify("#{params[:controller]}_controller")).new c.process(request,response) #如果需要当前的实例变量也由B来覆盖,那么开启下面一行, 并且在执行后需要调用return #c.instance_variables.each {|v| self.instance_variable_set(v,c.instance_variable_get(v))} end #在controlelr A中定义上面的方法然后调用: exeRedirect :controller => controllerB, :action => actionB
2009-06-09 10:55:31, 1013 reviews, comment
send to mailbox
几个rails tips
Performance Tuning for Linux Servers书笔记-Chap1
shell小技巧
Media change: please insert the disc labeled
在cron中执行一个控制器的action
少年,不点下广告吗!
all by shitou
blog comments powered by Disqus