Skip to content
Snippets Groups Projects
Commit f03ab692 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Merge branch 'master' of github.com:noesya/osuny

parents 48f1ee84 ab040d3f
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
protected
......@@ -7,4 +8,9 @@ class Users::RegistrationsController < Devise::RegistrationsController
return if request.params[:user].nil?
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
end
......@@ -15,6 +15,9 @@
<%= f.input :password_confirmation,
required: true,
input_html: { autocomplete: "new-password" } %>
<%= f.association :language,
required: true,
include_blank: 'Select a language' %>
</div>
<div class="form-actions">
......
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