From 0f7270d61187fa4c3fe724252f1aa319f85efba7 Mon Sep 17 00:00:00 2001 From: MadeTech Dushan Date: Mon, 22 Nov 2021 12:35:33 +0000 Subject: [PATCH] update from put to patch As per the notice in this documenation: https://github.com/heartcombo/devise/wiki/How-To:-Allow-users-to-edit-their-password --- app/views/devise/registrations/edit.html.erb | 2 +- config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 7370d2a06..e94eb88ca 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -2,7 +2,7 @@ <%= link_to 'Back', :back, class: "govuk-back-link" %> <% end %> -<%= form_for(resource, as: resource_name, url: user_registration_path(), html: { method: :put }) do |f| %> +<%= form_for(resource, as: resource_name, url: user_registration_path(), html: { method: :patch }) do |f| %>

Change your password

diff --git a/config/routes.rb b/config/routes.rb index b1d3c55c0..44faa64f6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,7 +5,7 @@ Rails.application.routes.draw do end as :user do get 'users/edit' => 'devise/registrations#edit', :as => 'edit_user_registration' - put 'users' => 'users/registrations#update', :as => 'user_registration' + patch 'users' => 'users/registrations#update', :as => 'user_registration' end # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html