Sha256: e8d41a8e1c73c668bf04abd5ac2b64900a6f6210a730aa9c84264b2bd3f233bd

Contents?: true

Size: 637 Bytes

Versions: 10

Compression:

Stored size: 637 Bytes

Contents

class BookingTemplatesController < HasAccountsController
  # Actions
  def create
    create! do |success, failure|
      success.html { redirect_to collection_path }
    end
  end

  def update
    update! do |success, failure|
      success.html { redirect_to collection_path }
    end
  end

  def new_booking
    booking_params = params[:booking] || {}
    booking_params[:value_date] ||= Date.today
    booking_params[:code]       ||= (Booking.maximum(:code) || 0) + 1
    booking_parameters = @booking_template.booking_parameters(booking_params)

    redirect_to simple_edit_bookings_path(:booking => booking_parameters)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
has_accounts_engine-3.0.0.beta7 app/controllers/booking_templates_controller.rb
has_accounts_engine-3.0.0.beta6 app/controllers/booking_templates_controller.rb
has_accounts_engine-3.0.0.beta5 app/controllers/booking_templates_controller.rb
has_accounts_engine-3.0.0.beta4 app/controllers/booking_templates_controller.rb
has_accounts_engine-3.0.0.beta3 app/controllers/booking_templates_controller.rb
has_accounts_engine-3.0.0.beta2 app/controllers/booking_templates_controller.rb
has_accounts_engine-3.0.0.beta1 app/controllers/booking_templates_controller.rb
has_accounts_engine-3.0.0.beta0 app/controllers/booking_templates_controller.rb
has_accounts_engine-2.0.1 app/controllers/booking_templates_controller.rb
has_accounts_engine-2.0.0 app/controllers/booking_templates_controller.rb