Method: DebitInvoicesController#create
- Defined in:
- app/controllers/debit_invoices_controller.rb
#create ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'app/controllers/debit_invoices_controller.rb', line 29 def create invoice_params = { :state => 'booked' } invoice_params.merge!(params[:debit_invoice]) if params[:debit_invoice] @debit_invoice = DebitInvoice.new(invoice_params) if @debit_invoice.save @debit_invoice.build_booking.save end create! end |