Problem creating Email form with redirect back if there are errors

Newbie here. I'm trying to create a simple e-mail form that validates if the name & email have been entered, and if not, sends the user back to the form with the previously entered data. The problem is I'm losing the form parameters (param[:name], param[:address], param [:message]), which means the user will have to re-enter them. What am I not understanding?

  def deliver_email     @errors =     if params[:name].empty?         @errors << "Enter your name"     end     if params[:address].empty?         @errors << "Enter your e-mail address"     end     unless @errors.empty?         flash[:notice] = @errors         redirect_to (:action => 'compose_email', :id => params[:id])     end (send the email...)   end

So there are a few ways to do this, but since you are a newbie, it might be best to use a model, rather than parameters (“Rails way” vs. “You could do it like that”). To fully diagnose this issue, I need to see the view. My guess is that you are not including the params in the view to populate the form.

Darian Shimy