Yes it is possible. This is what I have in one of my applications:
class DownloadsController < ApplicationController def download
The download action accepts the parameters passed from the form and sends them to a user class that generates several files, packs them as zip and returns the path to the file. You will need to find the best way to generate files for your own application, but I would recommend something similar - branching functionality into a separate class helps keep your controller light.
source share