Fixes sign up page

The rails4 upgrade broke the sign-up, we need to add the additional
attributes to the devise_parameter_sanitizer

 Fixes #303

Dominik Sander 11 lat temu
rodzic
commit
c0c2c75714
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6 0
      app/controllers/application_controller.rb

+ 6 - 0
app/controllers/application_controller.rb

@@ -2,6 +2,12 @@ class ApplicationController < ActionController::Base
2 2
   protect_from_forgery
3 3
 
4 4
   before_filter :authenticate_user!
5
+  before_action :configure_permitted_parameters, if: :devise_controller?
5 6
 
6 7
   helper :all
8
+
9
+  protected
10
+  def configure_permitted_parameters
11
+    devise_parameter_sanitizer.for(:sign_up) << [:username, :email, :invitation_code]
12
+  end
7 13
 end