Ungültige Authentizität Token auf Post

Ich bin mit devise anmelden/in.

Routen

get 'profile' => 'profile#get_profile'
post 'profile' => 'profile#create_profile'

und profile_controller

def get_profile
    render json: {user: current_user}, status: :ok
end

def create_profile
    render json: {user: current_user}, status: :ok
end

BEKOMMEN: http://localhost:3000/user/profile liefert die erwartete Ausgabe. Allerdings

POST Anfrage wirft eine Fehlermeldung angezeigt:

ActionController::InvalidAuthenticityToken in User::ProfileController#create_profile.

Bitte entwirren Sie dieses Verhalten.

InformationsquelleAutor Imran | 2015-12-13

Schreibe einen Kommentar