mardi 24 novembre 2015

Display user entered data on contact us form when validation fails in rails?

My controller is :

class ContactController < ApplicationController
     def contact_us
        @cntus = params[:post]
        if @cntus != nil
            @msg="Success"
        end
     end
end

Now when user entered invalid data or email verification failed, data must be present in the form what user had entered.

Aucun commentaire:

Enregistrer un commentaire