the text_field tag expects an object to exist so that it can use the specified attribute as the value for the field
so say i have the following in my 'new.rhtml' view:
text_field :user, :name
i might have in my 'new' action
@user = User.new(:name => "Billy")
when the view renders, the field will contain the value 'Billy'
keeping that in mind, say i submit my form to a 'create' action
def create @user = User.new(params[:user]) if @user.save redirect_to :action => :list and return end render :action => 'new' and return end
what happens here is that if there was a missing field in my form for whatever reason, i want to render the 'new' template and since i already instantiated @user, it's attributes will populate the form fields.
in your case, you would need a Billing object created to populate your fields, and it doesn't look like you have that.