foreman_packages 0.0.8 → 0.0.9
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.
@@ -3,7 +3,7 @@ module ForemanPackages
|
|
3
3
|
# GET /packages
|
4
4
|
# GET /packages.json
|
5
5
|
def index
|
6
|
-
@packages =
|
6
|
+
@packages = ForemanPackages::Package.all.paginate(:page => params[:page])
|
7
7
|
|
8
8
|
respond_to do |format|
|
9
9
|
format.html # index.html.erb
|
@@ -14,7 +14,7 @@ module ForemanPackages
|
|
14
14
|
# GET /packages/1
|
15
15
|
# GET /packages/1.json
|
16
16
|
def show
|
17
|
-
@package =
|
17
|
+
@package = ForemanPackages::Package.find(params[:id])
|
18
18
|
|
19
19
|
respond_to do |format|
|
20
20
|
format.html # show.html.erb
|
@@ -25,7 +25,7 @@ module ForemanPackages
|
|
25
25
|
# GET /packages/new
|
26
26
|
# GET /packages/new.json
|
27
27
|
def new
|
28
|
-
@package =
|
28
|
+
@package = ForemanPackages::Package.new
|
29
29
|
|
30
30
|
respond_to do |format|
|
31
31
|
format.html # new.html.erb
|
@@ -35,13 +35,13 @@ module ForemanPackages
|
|
35
35
|
|
36
36
|
# GET /packages/1/edit
|
37
37
|
def edit
|
38
|
-
@package =
|
38
|
+
@package = ForemanPackages::Package.find(params[:id])
|
39
39
|
end
|
40
40
|
|
41
41
|
# POST /packages
|
42
42
|
# POST /packages.json
|
43
43
|
def create
|
44
|
-
@package =
|
44
|
+
@package = ForemanPackages::Package.new(params[:package])
|
45
45
|
@package.filename = params[:package][:filename].original_filename
|
46
46
|
respond_to do |format|
|
47
47
|
if @package.save
|
@@ -57,7 +57,7 @@ module ForemanPackages
|
|
57
57
|
# PUT /packages/1
|
58
58
|
# PUT /packages/1.json
|
59
59
|
def update
|
60
|
-
@package =
|
60
|
+
@package = ForemanPackages::Package.find(params[:id])
|
61
61
|
@package.filename = params[:package][:filename].original_filename
|
62
62
|
respond_to do |format|
|
63
63
|
if @package.update_attributes(params[:package])
|
@@ -73,7 +73,7 @@ module ForemanPackages
|
|
73
73
|
# DELETE /packages/1
|
74
74
|
# DELETE /packages/1.json
|
75
75
|
def destroy
|
76
|
-
@package =
|
76
|
+
@package = ForemanPackages::Package.find(params[:id])
|
77
77
|
@package.destroy
|
78
78
|
|
79
79
|
respond_to do |format|
|