Class EnterpriseRegistrationController
In: app/controllers/public/enterprise_registration_controller.rb
Parent: ApplicationController

Methods

Public Instance methods

Just go to the first step.

FIXME: shouldn‘t this action present some sort of welcome message and point to the first step explicitly?

[Source]

    # File app/controllers/public/enterprise_registration_controller.rb, line 11
11:   def index
12:     @create_enterprise = CreateEnterprise.new(params[:create_enterprise])
13:     @create_enterprise.requestor = current_user.person
14:     the_action =
15:       if request.post?
16:         if @create_enterprise.valid_before_selecting_target?
17:           if @create_enterprise.valid?
18:             :confirmation
19:           else
20:             :select_validator
21:           end
22:         end
23:       end
24: 
25:     # default to basic_information
26:     the_action ||= :basic_information
27: 
28:     send(the_action)
29:     render :action => the_action
30:   end

Protected Instance methods

Fill in the form and select your Region.

Posts back.

[Source]

    # File app/controllers/public/enterprise_registration_controller.rb, line 37
37:   def basic_information
38:     @regions = environment.regions.select{|i| i.has_validator?}.map {|item| [item.name, item.id]}
39:   end

Actually records the enterprise registration request and presents a confirmation message saying to the user that the enterprise register request was done.

[Source]

    # File app/controllers/public/enterprise_registration_controller.rb, line 52
52:   def confirmation
53:     @create_enterprise.save!
54:   end

present information about validator organizations, and the user one to validate her brand new enterprise.

Posts back.

[Source]

    # File app/controllers/public/enterprise_registration_controller.rb, line 45
45:   def select_validator
46:     @validators = @create_enterprise.region.validators
47:   end

[Validate]