我正试着用
ApplicationController.renderer.render(partial: 'details/proposal')在Mailer中
有什么帮助吗??
发布于 2017-01-28 22:32:58
ApplicationController.renderer.render是Rails5的新特性,如果你不使用5,很遗憾你还不能使用它。
在Rails4上,最简单的方法是使用ActionView::Base,如下所示:
controller = ActionController::Base.new
view = ActionView::Base.new(ActionController::Base.view_paths, {}, controller)
view.render(partial: 'details/proposal')https://stackoverflow.com/questions/41902712
复制相似问题