search for: logfilecontroller

Displaying 2 results from an estimated 2 matches for "logfilecontroller".

2006 Jun 07
5
File is nil
I don''t understand why my program does not get the file that I try to upload. It returns the following error when I try to upload a small file: NoMethodError in LogfileController#create You have a nil object when you didn''t expect it! The error occured while evaluating nil.original_filename #{RAILS_ROOT}/app/models/logfile.rb:9:in `file='' #{RAILS_ROOT}/app/controllers/logfile_controller.rb:31:in `create'' Request Parameters: {"l...
2006 Jun 13
2
One model handling two different file types
...le= method to handle an uploaded test file. What I want is to be able to upload either a text file or zipfile. The zipfile contains text files, and I''d like to save each text file within this zipfile as a Logfile. Is possible to handle both within Logfile? Or should I handle them in LogfileController? Would I have to have two of these (one for txt and another for zip)? Upload File: <%= file_field(:logfile, ''file'') %> If I handle this in the controller, would I have to create a separate hash for the file alone? I ask this because using @uploaded_file = par...