Calendar is fullscreen
This commit is contained in:
@@ -2,8 +2,10 @@ class ReservationsController < ApplicationController
|
||||
before_action :set_company
|
||||
before_action :set_reservation, only: %i[ show edit update destroy ]
|
||||
|
||||
layout :determine_layout
|
||||
# GET /reservations or /reservations.json
|
||||
def index
|
||||
|
||||
@reservations = Reservation.all
|
||||
end
|
||||
|
||||
@@ -70,4 +72,9 @@ class ReservationsController < ApplicationController
|
||||
def reservation_params
|
||||
params.require(:reservation).permit(:company_id, :customer_id, :place_id, :title, :description, :start_time, :end_time)
|
||||
end
|
||||
|
||||
def determine_layout
|
||||
action_name == 'index' ? 'calendar' : 'application'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user