normal render statement
August 13, 2014 ยท View on GitHub
view_assigns = {widgets: Widget.all} av = ActionView::Base.new(ActionController::Base.view_paths, view_assigns) av.class_eval do
include any needed helpers (for the view)
include ApplicationHelper end
normal render statement
content = av.render template: 'widgets/index.xlsx.axlsx'
do something with content, such as:
File.open("/tmp/with_runner.xlsx","w+b") {|f| f.puts content }