diff --git a/app/controllers/users/registrations_controller.rb b/app/controllers/users/registrations_controller.rb index ab4d6bd3b..9baf44b7c 100644 --- a/app/controllers/users/registrations_controller.rb +++ b/app/controllers/users/registrations_controller.rb @@ -1,4 +1,6 @@ class Users::RegistrationsController < Devise::RegistrationsController + before_filter :update_sanitized_params, if: :devise_controller? + # POST /resource def create # Try stop bots @@ -8,4 +10,13 @@ class Users::RegistrationsController < Devise::RegistrationsController end super end + + protected + + def update_sanitized_params + devise_parameter_sanitizer.for(:sign_up) do |u| + u.permit(:uname, :name, :email, :password, :password_confirmation) + end + end + end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index cc601ad0e..bc6ffc4cb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,7 +4,7 @@ Rosa::Application.routes.draw do get :sended end - devise_scope :users do + devise_scope :user do get '/users/auth/:provider' => 'users/omniauth_callbacks#passthru' get 'users/sign_up' => 'users/registrations#new', as: :new_user_registration post 'users' => 'users/registrations#create', as: :user_registration