add splash screen to the casting calls
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user