Saving a file ... what's missing

I’m trying to do the classic file upload to a directory in my file
system (public/drawings). I have the following:

In the view:
<%= file_field ( “drawing”, “drawingfile” ) %>

In the controller, in addition to the usual .save, I have

In the model, I have

def save_drawing(inputfile)
	if inputfile.original_filename"#{RAILS_ROOT}/public/drawings/#{inputfile.original_filename}",
“wb”) {
|f| f.write( }

The save_drawing routine is almost verbatim from the HowToUploadAFile
document. It IS creating a file in the right location in the file
system, but no data is being written to it (e.g. a zero length file).

What am I missing?

Thanks in advance

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs