Class: User::SignUpsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- User::SignUpsController
- Defined in:
- app/controllers/user/sign_ups_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 14 |
# File 'app/controllers/user/sign_ups_controller.rb', line 10 def create @sign_up = SignUp.new(sign_up_params).sign_up_with(Identities::Email) perform_sign_up @sign_up end |
#new ⇒ Object
6 7 8 |
# File 'app/controllers/user/sign_ups_controller.rb', line 6 def new @sign_up = SignUp.new end |
#oauth_callback ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/user/sign_ups_controller.rb', line 16 def oauth_callback # TODO: do I need to check the provider param? There is on in oauth_data # and one in params. oauth_data = request.env["omniauth.auth"] # FIXME: the way the user_name is inferred might work for facebook only oauth_params = {oauth_data: oauth_data, user_name: oauth_data[:info][:nickname]} # TODO: The host app should be able to do a sign_up here instead @sign_up = SignUp.new(oauth_params).sign_in_with(Identities::OAuth) perform_sign_up @sign_up end |