I've seen all sorts of places where people put their 'require'
and I'm not sure what the best solution is. I'm currently using it
in a model/csv_processor.rb:
I'm calling this from controllers/loader_controller.db:
my_csv_table = CsvProcessor.create_csv_table(params[:file_ref])
Works perfectly. But generally, where is the place to put all those
require statements? Is it in config/environment.rb? Would it be correct
to add them just at the end of this file?
I already tried this with another "processor", which needs the
gem. So I added at the end of environment.rb the statements:
plsql.activerecord_class = ActiveRecord::Base
plsql.connection.autocommit = false
But this didn't work. I couldn't start webrick anymore. Having instead
the same statements at the beginning of model/plsql_processor.rb
works without problems.
Any help would be appreciated,