app/controllers/costumes_controller.rb
## assign action helper
# redirects to assign costume form if has shared info errors
# checks if either the dance_season or song_name value is empty
assign action helper
redirects to assign costume form if has shared info errors
checks if either the dance_season or song_name value is empty
assign action helper redirects to assign costume form if has shared info errors checks if either the dance_season or song_name value is empty
def redirect_to_assign_costume_form_if_required_fields_empty
    if @costume.costume_assignments.empty?
      redirect_to assign_costume_path(@costume), danger: 'Assignment failure: Must fill out Dance Season & Song Name AND select at least 1 dancer w/ costume size & costume condition' if @dance_season_empty || @song_name_empty
    else 
      redirect_to assign_costume_path(@costume, season: @costume.costume_assignments.last.dance_season), danger: 'Assignment failure: Must fill out Dance Season & Song Name AND select at least 1 dancer w/ costume size & costume condition' if @dance_season_empty || @song_name_empty
    end
  end
def redirect_to_assign_costume_form_if_required_fields_empty if @costume . costume_assignments . empty? redirect_to assign_costume_path ( @costume ) , danger : 'Assignment failure: Must fill out Dance Season & Song Name AND select at least 1 dancer w/ costume size & costume condition' if @dance_season_empty || @song_name_empty else redirect_to assign_costume_path ( @costume , season : @costume . costume_assignments . last . dance_season ) , danger : 'Assignment failure: Must fill out Dance Season & Song Name AND select at least 1 dancer w/ costume size & costume condition' if @dance_season_empty || @song_name_empty end end
assign action helper
redirects to assign costume form if has shared info errors
checks if either the dance_season or song_name value is empty
assign action helper redirects to assign costume form if has shared info errors checks if either the dance_season or song_name value is empty
# if costume has been previously assigned