the text_field helper expects the first parameter to be an instance
variable. The second parameter is the method that will be called on
the instance variable to populate the value of the text field. So if
you have the following:
@user = User.new(params[:user])
<%= text_field :user, :first_name %>
the field will contain the value of the user's first name (providing
that you have a "first_name" attribute in your users table in your
database). If the user doesn't have a first name (ie the record is
new), then the value will be blank.
If you want more control about how the text field's value is
populated, you can use the following:
text_field_tag 'name of text field', @value
you should read through Agile Web Development for Rails if you haven't
done so already.. This type of stuff is outlined in the book.