12 lines
325 B
Ruby
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
|