Class: Stormpath::Rails::Register::NewController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/stormpath/rails/register/new_controller.rb

Instance Method Summary collapse

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/stormpath/rails/register/new_controller.rb', line 6

def call
  if stormpath_config.web.id_site.enabled
    redirect_to(stormpath_id_site_register_url)
  elsif signed_in?
    redirect_to(root_path)
  elsif organization_unresolved?
    redirect_to(parent_register_url)
  else
    respond_to do |format|
      format.json { render json: RegistrationFormSerializer.to_h }
      format.html { render stormpath_config.web.register.view }
    end
  end
end