Figured out how to get my file uploaded although I can't access the
origional_filename now. This is starting to frustrate me. I don't
really want or need all the extra stuff included in acts_as_attachment
and I have to interact with it via the commandline, RadRails hasn't
fixed their server problem yet (been a month now) so I can't update
plugins through Eclipse.
If anyone could help me get this working that would be fantastic.
Here is the new code which uploads the file but won't let me get the
filename (I have to give it a generic name).
Model
def self.automate(schedule)
@file_name = "test"
schedule[:schedule_file].rewind
File.open("schedule_store/#{@file_name}", "w") { |f|
f.write(schedule[:schedule_file].read) }
end
Controller
def auto
if request.post?
@sched = Schedule.automate(params[:schedule])
end
end