wco_hosting 0.0.0.1 → 0.0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db8fa49242cace48684ab299e74aeeb62945ac04961c300f0ca642c10f7015a7
|
4
|
+
data.tar.gz: 861d0db26431887c700c759befc3c398061e076a00cffd24138f0694dc217e33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7537db53e574d8737b39cadc75e79aafe46bee69233c0e495b1f899b54e81645f4d131557b9c8227ae76fe2a30165f009aff66c082534bebc83b78b61f5b3e13
|
7
|
+
data.tar.gz: fe62a593cf42a12b557f8a5c1875246d6005a3e77353224b149ceb9a174363b90f6c2cd1b9d97005d6bb84b784b06a3ebd4f38bc39aa8676315dec0de6c3f00a
|
@@ -1,9 +1,18 @@
|
|
1
1
|
|
2
2
|
class WcoHosting::ServerhostsController < WcoHosting::ApplicationController
|
3
3
|
|
4
|
-
def
|
5
|
-
|
6
|
-
|
4
|
+
def create
|
5
|
+
@serverhost = WcoHosting::Serverhost.new params[:serverhost].permit!
|
6
|
+
authorize! :create, @serverhost
|
7
|
+
|
8
|
+
flag = @serverhost.save
|
9
|
+
if flag
|
10
|
+
flash[:notice] = 'Success.'
|
11
|
+
redirect_to action: :index
|
12
|
+
else
|
13
|
+
flash[:alert] = "Cannot create serverhost: #{@serverhost.errors.full_messages.join(', ')}."
|
14
|
+
render action: :index
|
15
|
+
end
|
7
16
|
end
|
8
17
|
|
9
18
|
def edit
|
@@ -11,6 +20,17 @@ class WcoHosting::ServerhostsController < WcoHosting::ApplicationController
|
|
11
20
|
authorize! :edit, @serverhost
|
12
21
|
end
|
13
22
|
|
23
|
+
def index
|
24
|
+
authorize! :index, WcoHosting::Serverhost
|
25
|
+
@serverhosts = WcoHosting::Serverhost.all
|
26
|
+
@new_serverhost = WcoHosting::Serverhost.new
|
27
|
+
end
|
28
|
+
|
29
|
+
def new
|
30
|
+
authorize! :index, WcoHosting::Serverhost
|
31
|
+
@new_serverhost = WcoHosting::Serverhost.new
|
32
|
+
end
|
33
|
+
|
14
34
|
def update
|
15
35
|
@serverhost = WcoHosting::Serverhost.find params[:id]
|
16
36
|
authorize! :update, @serverhost
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_hosting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
@@ -225,6 +225,7 @@ files:
|
|
225
225
|
- app/views/wco_hosting/serverhosts/_form.haml
|
226
226
|
- app/views/wco_hosting/serverhosts/edit.haml
|
227
227
|
- app/views/wco_hosting/serverhosts/index.haml
|
228
|
+
- app/views/wco_hosting/serverhosts/new.haml
|
228
229
|
- config/routes.rb
|
229
230
|
- lib/tasks/wco_hosting_tasks.rake
|
230
231
|
- lib/wco_hosting.rb
|