Sha256: 7c456968103b6f22ca9fd244c1f5b575eb24118da3216c6347c0b343cc634bbd
Contents?: true
Size: 636 Bytes
Versions: 3
Compression:
Stored size: 636 Bytes
Contents
class BookingTemplatesController < AuthorizedController # 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
3 entries across 3 versions & 1 rubygems