Skip to content
Snippets Groups Projects
Unverified Commit 0bde9d28 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

account update

parent 5a839ed0
No related branches found
No related tags found
No related merge requests found
class Users::RegistrationsController < Devise::RegistrationsController
prepend_before_action :set_university, only: :create
before_action :configure_sign_up_params, only: :create
before_action :configure_account_update_params, only: :update
protected
......@@ -9,8 +10,11 @@ class Users::RegistrationsController < Devise::RegistrationsController
request.params[:user][:university_id] = current_university.id
end
# If you have extra params to permit, append them to the sanitizer.
def configure_sign_up_params
devise_parameter_sanitizer.permit(:sign_up, keys: [:language_id])
end
def configure_account_update_params
devise_parameter_sanitizer.permit(:account_update, keys: [:mobile_phone, :language_id])
end
end
......@@ -10,6 +10,9 @@
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
<% end %>
<%= f.input :mobile_phone %>
<%= f.association :language, include_blank: false %>
<%= f.input :password,
hint: "leave it blank if you don't want to change it",
required: false,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment