obsolete.ChilliProject/lib/redmine/views/api_template_handler.rb

12 lines
325 B
Ruby

module Redmine
module Views
class ApiTemplateHandler < ActionView::TemplateHandler
include ActionView::TemplateHandlers::Compilable
def compile(template)
"Redmine::Views::Builders.for(params[:format]) do |api|; #{template.source}; self.output_buffer = api.output; end"
end
end
end
end