Rails 3 render action from another controller
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to render another controller action and i get this error Missing partial controller/index with {:formats=>[:html], :locale=>[:en, :en], :handlers=>[:rjs, :rhtml, :rxml, :erb, :builder]} in view paths "/path_to/app/views" how can i render another controller action into a view but without sending an redirect to the client ? I've tried "index", :controller=>"controller" %> but it seems that is not working. 回答1: Try to render template: "controller/index" %> Or file: "#{Rails.root}/app/controllers/controller/index" %> And I believe you