add splash screen to the casting calls

This commit is contained in:
Bilal
2020-07-28 12:01:51 +02:00
parent 4f1ebb27d0
commit 624922cc5c
7 changed files with 171 additions and 42 deletions

View File

@@ -4,6 +4,7 @@ class CastingCallsController < ApplicationController
before_action :set_project
before_action :build_casting_call, only: [:new, :create]
before_action :set_casting_call, only: [:show, :edit, :update, :cancel]
before_action :show_splash_screen, only: :index
def index
@casting_calls = casting_calls.order_by_recent.paginate(page: params[:page])
@@ -45,6 +46,10 @@ class CastingCallsController < ApplicationController
private
def show_splash_screen
render :splash if casting_calls.count.zero?
end
def casting_call_params
params.require(:casting_call).permit(:title, :description, :project_description, :interview_instructions, :interview_requirements, :questions)
end