14 lines
350 B
Ruby
14 lines
350 B
Ruby
class ReportsController < ApplicationController
|
|
def index
|
|
end
|
|
|
|
def create
|
|
inn = params[:inn]
|
|
output_path = Rails.root.join('tmp', 'reports', inn)
|
|
FileUtils.mkdir_p(output_path)
|
|
|
|
FileProcessorJob.perform_async(inn, output_path.to_s)
|
|
|
|
redirect_to reports_path, notice: 'Отчёт загружается в фоне'
|
|
end
|
|
end |