控制器中的此代码
av = ActionView::Base.new(Rails::Configuration.new.view_path)
av.extend ApplicationHelper
content = av.render(:file => "show", :locals => { :user => @user })
和 show.html.erb 有link_to
帮助,操作代码错误
undefined method `url_for' for nil:NilClass
我 av.extend ActionController::UrlWriter
在控制器中添加,仍然错误
undefined method `default_url_options' for ActionView::Base:Class