53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/thinreports-rails/template_handler.rb', line 53
def self.call(template)
%{
if defined?(report)
#{template.source}
else
generate_options = nil
Thinreports::Report.create do |__report__|
report = ThinreportsRails::ThinreportsTemplate.new(__report__, self, '#{template.virtual_path}')
report.set_layout :allow_no_layout => true
#{template.source}
generate_options = report._generate_options
end.generate(*([generate_options].compact))
end
}
end
|