wco_hosting 0.0.0.22 → 0.0.0.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/wco_hosting/environments_controller.rb +32 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cff885e1e36cf5412a159cd74c0b3cf7134ceb21ec3c8a3ba691c34ddb404746
|
4
|
+
data.tar.gz: 133c12ae6f3f43365bec9df2bf249b206f9629f0854f1bb8e01369f07338b00c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4a953cd44c0f5937dac0a7f1f236f80c374fe824785468514cb678ac55d226c4023e1a62e37d376fda7c68b14a806d1d4114314c55b2253a551ecbe9bad76f3
|
7
|
+
data.tar.gz: 700eebd07c51fb588669353e4899b3c07e706e3b852c751e74e3027d2d4ea1585b5d1c750fece28a2441c441fa1f3e79ca98267a1fcd40c453748b8ab2a202bf
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
class WcoHosting::EnvironmentsController < WcoHosting::ApplicationController
|
3
|
+
|
4
|
+
def index
|
5
|
+
authorize! :index, WcoHosting::Environment
|
6
|
+
@environments = WcoHosting::Environment.all
|
7
|
+
end
|
8
|
+
|
9
|
+
def edit
|
10
|
+
@environment = WcoHosting::Environment.find params[:id]
|
11
|
+
authorize! :edit, @environment
|
12
|
+
end
|
13
|
+
|
14
|
+
def show
|
15
|
+
@environment = WcoHosting::Environment.find params[:id]
|
16
|
+
authorize! :show, @environment
|
17
|
+
@subenvironments = WcoHosting::Appliance.where( environment: @environment.name ).map( &:subenvironment )
|
18
|
+
end
|
19
|
+
|
20
|
+
def update
|
21
|
+
@environment = WcoHosting::Environment.find params[:id]
|
22
|
+
authorize! :update, @environment
|
23
|
+
if @environment.update_attributes( params[:environment].permit! )
|
24
|
+
flash_notice @environment
|
25
|
+
else
|
26
|
+
flash_alert @environment
|
27
|
+
end
|
28
|
+
redirect_to action: :index
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
end
|