app/controllers/sessions_controller.rb
# This is called when the user has entered his credentials
This is called when the user has entered his credentials
This is called when the user has entered his credentials
def rvs_login
    current_user.attributes = user_params
    if current_user.rvs_get_key
      render :connected
    else
      flash.now[:danger] = 'Invalid credentials'
      render :connect
    end
  end
def rvs_login current_user . attributes = user_params if current_user . rvs_get_key render :connected else flash . now [ :danger ] = 'Invalid credentials' render :connect end end
This is called when the user has entered his credentials
This is called when the user has entered his credentials
# Set the user attributes