Fixed: sign_up

This commit is contained in:
Vokhmin Alexey V 2014-03-27 18:25:15 +04:00
parent 93dd8dc48e
commit cab3debd4a
2 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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