def create
      invitation = Invitation.find_by_rsvp_code(params[:rsvp_code])
      if invitation
        session[:invitation_id] = invitation.id
        redirect_to (invitation.responses.any? ? show_response_index_path : response_index_path)
      else
        if exceeded_access_attempts?
          redirect_when_locked
        else
          flash.alert = "Oops!! The code you entered is not valid. Please try again."
          redirect_to root_path
        end
      end
    end
def create
      invitation = Invitation.find_by_rsvp_code(params[:rsvp_code])
      if invitation
        session[:invitation_id] = invitation.id
        redirect_to (invitation.responses.any? ? show_response_index_path : response_index_path)
      else
        if exceeded_access_attempts?
          redirect_when_locked
        else
          flash.alert = "Oops!! The code you entered is not valid. Please try again."
          redirect_to root_path
        end
      end
    end
POST /session