Help with file_field

I'm new to ruby and rails, so sorry if this is a simple question. I've found lots of examples that demonstrate uploading pictures, but I need something simpler.

Could someone post a simple example of uploading a text file, saving the file in an object and then "puts" the object text. I'm really getting lost in two steps:

1. How to get from file name to file contents

2. What object.method gets called from the form and what data is passed in that call.

Ultimately, the file will be XML data used to create forms for editing and saving.