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