app/helpers/costumes_helper.rb
# return true if @costume has no rows w/ 2020 dance season in CostumeAssignments table
return true if @costume has no rows w/ 2020 dance season in CostumeAssignments table
return true if @costume has no rows w / 2020 dance season in CostumeAssignments table
def assign_costume_button(costume)
    link_to_if costume.seasons.empty?, 'Assign Costume', assign_costume_path(costume), class: 'button is-success is-light' do |name|
      link_to name, assign_costume_path(costume, season: costume.seasons.to_a.pop[0]), class: 'button is-success is-light'
    end
  end
def assign_costume_button ( costume ) link_to_if costume . seasons . empty? , 'Assign Costume' , assign_costume_path ( costume ) , class : 'button is-success is-light' do | name | link_to name , assign_costume_path ( costume , season : costume . seasons . to_a . pop [ 0 ] ) , class : 'button is-success is-light' end end
return true if @costume has no rows w/ 2020 dance season in CostumeAssignments table
return true if @costume has no rows w / 2020 dance season in CostumeAssignments table
# if previously assigned, pass the last season the costume was assigned
costume
<not_specific>