I'm trying to split controller into several files. I tried extracting methods into separate files and then requiring them in main controller, but this doesn't seem to work.
controllers/reports/sales_reports.rb: class ReportController < ApplicationController def sales end end
controllers/reports/purchases_reports.rb: class ReportController < ApplicationController def purchases end end
controllers/report_controller.rb: require 'reports/sales_reports' require 'reports/purchases_reports' class ReportController < ApplicationController end
This doesn't seem to work. What I'm doing wrong?