def create
chef = Chef.find_by(email: params[:email])
if chef && chef.authenticate(params[:password])
**session[:chef_id] = chef.id**
flash[:success] = "You logged In"
redirect_to recipes_path
else
flash.now[:danger] = "Check your email or password"
render 'new'
end
end
What does
session[:chef_id] = chef.id
do? Is that session[:chef_id]
a kind of variable or something? To which the id of a chef is assigned? Can I use some other name there?