4 Replies Latest reply on May 7, 2013 11:36 PM by Ankur Srivastava

    Passing value from login erb to next welcome controller

      I have to pass username from login screen to to welcome control.


      In the applications/index.erb i have created the form with submit action with js and loading welcomeController with page slide;





                   if($("input[name=Username]").last().val()!=="" && $("input[name=Password]").last().val()!==""){

                     var text = $("#username").val();


                   } else {

                     alert("Please fill all the required details!");

                     return false;








      In the WelcomeController/index.erb

      <span >Welcome <%= @userName %>!</span>



      @userName =  'Guest'

      static now, i want to make the username dynamic with the entered username in login screen.


      Please help me out.