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