I need to upload a CSV file in my application and I am trying to do so
with a sample I found googling around, which defines a model that
inherits from ActiveRecord::Base.
The problem I am having is that whenever an error occurs Rails
complains because there is no DB table behind the model, which I don't
need since there would be nothing to be stored in it.
I would like to be able to not have the table and also use
ActiveRecord::Errors capabilities since I would like to keep the look
and feel of the rest of the page when handling errors.
Is there a way of telling Rails that there is no table behind the
model? And if that is not possible, is there a way to instantiate an
ActiveRecord::Errros object inside the class without inheriting from
ActiveRecord::Base and make it work the same way as it usually does?