I just learned about pry for debugging in rails, I'm working on a ecommerce site , on the main sign in page, when the login button is clicked, the email, username and the password field of the login form is suppose to save to the database. Instead of getting Example A, I get Example B but I'm not sure what {"controller"=> "application", "action" => "login"} means. Can someone help me please.
Example:A correct result Example:B [wrong result pasted below][1]
23: def login
24: @username = params[:username]
25: @email = params[:email]
26: @password = params[:password]
=> 27: binding.pry
28: if @email && @password
29: session[:signed_in] = true
30: session[:username] = params[:username]
31: redirect_to '/profile'
32: end
33: end
[1] pry(#<ApplicationController>)> @username
=> nil
[2] pry(#<ApplicationController>)> params
=> {"controller"=>"application", "action"=>"login"}
[3] pry(#<ApplicationController>)>
My sign in form:
<form action='/login' class='validate-form' method='post'>
<p class="checkout-coupon top log a-an">
<label class="l-contact">
Email Address
<em>*</em>
</label>
<input type="email">
</p>
<p class="checkout-coupon top log a-an">
<label class="l-contact">
Username
<em>*</em>
</label>
<br>
<input type="email">
</p>
<p class="checkout-coupon top-down log a-an">
<label class="l-contact">
password
<em>*</em>
</label>
<input type="password">
</p>
<div class="forgot-password1">
<label class="inline2">
<input type="checkbox" name="rememberme7">
Remember me! <em>*</em>
</label>
<a class="forgot-password" href="#">Forgot Your password?</a>
</div>
<p class="login-submit5">
<input class="button-primary" type="submit" value="login">
</p>
</form>
My routes.rb:
Rails.application.routes.draw do
get '/profile', to:'application#profile'
get '/logout', to: 'application#logout'
post '/login', to: 'application#login'
end