Class: CartridgesController
Instance Method Summary
collapse
#active_tab
#sshkey_uploaded?
#domain_is_missing, #user_default_domain
#user_capabilities
Instance Method Details
#create ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'app/controllers/cartridges_controller.rb', line 16
def create
cart_params = params[:cartridge]
@domain = Domain.find :one, :as => current_user
@application = @domain.find_application params[:application_id]
@cartridge = Cartridge.new cart_params
@cartridge.application = @application
@cartridge.as = current_user
@cartridge_type = CartridgeType.find cart_params[:name], :as => current_user
if @cartridge.save
@wizard = true
message = @cartridge.remote_results
flash.now[:info_pre] = message
render :next_steps
else
Rails.logger.debug @cartridge.errors.inspect
@application_id = @application.id
render 'cartridge_types/show'
end
end
|
#index ⇒ Object
3
4
5
6
|
# File 'app/controllers/cartridges_controller.rb', line 3
def index
redirect_to application_path(params['application_id'])
end
|
#show ⇒ Object
8
9
10
11
12
13
14
|
# File 'app/controllers/cartridges_controller.rb', line 8
def show
user_default_domain
@application = @domain.find_application params[:application_id]
@application_type = ApplicationType.find @application.framework
Rails.logger.debug @application.cartridges
@cartridge = @application.find_cartridge params[:id]
end
|