12 Added notes and colours to customers
This commit is contained in:
@@ -41,7 +41,10 @@ class ReservationsController < ApplicationController
|
||||
# POST /reservations or /reservations.json
|
||||
def create
|
||||
@reservation = @company.reservations.new(
|
||||
reservation_params.except(:customer_id, :customer_birth_year)
|
||||
reservation_params.except(
|
||||
:customer_id, :customer_first_name, :customer_surname,
|
||||
:customer_original_phone, :customer_birth_year, :customer_composite_key
|
||||
)
|
||||
)
|
||||
|
||||
# Find or create customer based on submitted attributes
|
||||
@@ -68,7 +71,7 @@ class ReservationsController < ApplicationController
|
||||
customer_attrs = build_customer_attributes # Use existing helper
|
||||
reservation_attrs = reservation_params.except(
|
||||
:customer_id, :customer_first_name, :customer_surname,
|
||||
:customer_original_phone, :customer_birth_year
|
||||
:customer_original_phone, :customer_birth_year, :customer_composite_key
|
||||
)
|
||||
|
||||
# Find the customer identified by the submitted name/phone
|
||||
@@ -144,6 +147,7 @@ class ReservationsController < ApplicationController
|
||||
:customer_surname,
|
||||
:customer_original_phone,
|
||||
:customer_birth_year,
|
||||
:customer_composite_key,
|
||||
:customer_id # Allow this if select still sends it sometimes
|
||||
)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user