Compare commits
No commits in common. "4e18ab61d79abc7eb191a8ea534742d65e246c11" and "e26ef59ea24e1849a22fe34ea282573d2f527f2a" have entirely different histories.
4e18ab61d7
...
e26ef59ea2
2 changed files with 2 additions and 32 deletions
|
@ -114,7 +114,6 @@ GEM
|
||||||
marcel (1.0.2)
|
marcel (1.0.2)
|
||||||
matrix (0.4.2)
|
matrix (0.4.2)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
midi-smtp-server (3.0.2)
|
|
||||||
mini_mime (1.1.2)
|
mini_mime (1.1.2)
|
||||||
mini_portile2 (2.6.1)
|
mini_portile2 (2.6.1)
|
||||||
minitest (5.15.0)
|
minitest (5.15.0)
|
||||||
|
@ -247,7 +246,6 @@ DEPENDENCIES
|
||||||
haml-rails (~> 2.0)
|
haml-rails (~> 2.0)
|
||||||
jbuilder (~> 2.7)
|
jbuilder (~> 2.7)
|
||||||
listen (~> 3.3)
|
listen (~> 3.3)
|
||||||
midi-smtp-server
|
|
||||||
puma (~> 5.0)
|
puma (~> 5.0)
|
||||||
rack-mini-profiler (~> 2.0)
|
rack-mini-profiler (~> 2.0)
|
||||||
rails (~> 6.1.4, >= 6.1.4.4)
|
rails (~> 6.1.4, >= 6.1.4.4)
|
||||||
|
|
|
@ -37,7 +37,7 @@ class SuppliersController < ApplicationController
|
||||||
# POST /suppliers
|
# POST /suppliers
|
||||||
# POST /suppliers.xml
|
# POST /suppliers.xml
|
||||||
def create
|
def create
|
||||||
@supplier = Supplier.new(supplier_params)
|
@supplier = Supplier.new(params[:supplier])
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @supplier.save
|
if @supplier.save
|
||||||
|
@ -55,7 +55,7 @@ class SuppliersController < ApplicationController
|
||||||
# PUT /suppliers/1.xml
|
# PUT /suppliers/1.xml
|
||||||
def update
|
def update
|
||||||
@supplier = Supplier.find(params[:id])
|
@supplier = Supplier.find(params[:id])
|
||||||
attrs = supplier_params
|
attrs = params[:supplier]
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
# @todo fix by generating proper hidden input in html
|
# @todo fix by generating proper hidden input in html
|
||||||
|
@ -86,32 +86,4 @@ class SuppliersController < ApplicationController
|
||||||
format.xml { head :ok }
|
format.xml { head :ok }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
|
||||||
|
|
||||||
def supplier_params
|
|
||||||
params
|
|
||||||
.require(:supplier)
|
|
||||||
.permit(
|
|
||||||
:name,
|
|
||||||
:address,
|
|
||||||
:phone,
|
|
||||||
:phone2,
|
|
||||||
:fax,
|
|
||||||
:email,
|
|
||||||
:url,
|
|
||||||
:delivery_days,
|
|
||||||
:note,
|
|
||||||
:ftp_sync,
|
|
||||||
:ftp_host,
|
|
||||||
:ftp_user,
|
|
||||||
:ftp_password,
|
|
||||||
:ftp_type,
|
|
||||||
:ftp_regexp,
|
|
||||||
:mail_sync,
|
|
||||||
:mail_type,
|
|
||||||
:mail_from,
|
|
||||||
:mail_subject
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue