fix clients controller

This commit is contained in:
Stefan Tollkühn
2025-07-22 16:00:24 +02:00
parent e1129b2430
commit 4baed9284e

View File

@@ -60,11 +60,11 @@ class ClientsController < ApplicationController
private
# Use callbacks to share common setup or constraints between actions.
def set_client
@client = Client.find(params.expect(:id))
@client = Client.find(params[:id])
end
# Only allow a list of trusted parameters through.
def client_params
params.expect(client: [ :company_name, :firstname, :lastname, :streetname, :zipcode, :city, :country, :email, :phone ])
params.require(:client).permit(:company_name, :firstname, :lastname, :streetname, :zipcode, :city, :country, :email, :phone)
end
end