私の Rails アプリには、非常に単純な Ruport セットアップがあり、Ruport コントローラーはReport::Data::Table
インスタンスに渡されます。
class Reporter < Ruport::Controller
stage :headline, :data, :footer
required_option :report
def setup
report_klass = options.report.report_model
report_klass ||= Report
self.data = report_klass.send(:report_table_by_sql, options.report.query)
end
end
Data::Table
データに格納されているインスタンスは、レンダリングを要求されたときに委任されたコントローラーとして使用さRuport::Data::Table
れるため、後で呼び出すときにそれが呼び出されます
output << data.to_html
レンダリング メソッドを Reporter クラスに委譲するようにデータに指示するにはどうすればよいですか?