method

new

new(*args)
public

No documentation available.

# File actionpack/lib/action_view/test_case.rb, line 6
    def initialize(*args)
      @_rendered = { :template => nil, :partials => Hash.new(0) }
      initialize_without_template_tracking(*args)
    end

1Note

When using ActionView::Base.new to render templates views

carlos_roque ยท Apr 17, 2018

when calling this method to render templates to a string. in order to use any helper methods you need to add them to the view like this

view = ActionView::Base.new(ActionController::Base.view_paths, {})
view.class_eval do  
# include any needed helpers (for the view)
include ApplicationHelper
end 

source: http://peden.biz/rendering-a-rails-view-from-a-script/