Actually, now that I look closer, could we just have a single model for all files, and use an ActiveRecord polymorphic relationship?

http://guides.rubyonrails.org/association_basics.html#polymorphic-associations