foreman_packages 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
@@ -40,8 +40,8 @@ class ForemanPackages::SypackagesController < ApplicationController
|
|
40
40
|
# POST /sypackages
|
41
41
|
# POST /sypackages.json
|
42
42
|
def create
|
43
|
-
@sypackage = ForemanPackages::Sypackage.new(params[:
|
44
|
-
@sypackage.filename = params[:
|
43
|
+
@sypackage = ForemanPackages::Sypackage.new(params[:foreman_packages_sypackage])
|
44
|
+
@sypackage.filename = params[:foreman_packages_sypackage][:filename].original_filename
|
45
45
|
respond_to do |format|
|
46
46
|
if @sypackage.save
|
47
47
|
format.html { redirect_to @sypackage, notice: 'ForemanPackages::Sypackage was successfully created.' }
|
@@ -57,9 +57,9 @@ class ForemanPackages::SypackagesController < ApplicationController
|
|
57
57
|
# PUT /sypackages/1.json
|
58
58
|
def update
|
59
59
|
@sypackage = ForemanPackages::Sypackage.find(params[:id])
|
60
|
-
@sypackage.filename = params[:
|
60
|
+
@sypackage.filename = params[:foreman_packages_sypackage][:filename].original_filename
|
61
61
|
respond_to do |format|
|
62
|
-
if @sypackage.update_attributes(params[:
|
62
|
+
if @sypackage.update_attributes(params[:foreman_packages_sypackage])
|
63
63
|
format.html { redirect_to @sypackage, notice: 'Sypackage was successfully updated.' }
|
64
64
|
format.json { head :no_content }
|
65
65
|
else
|