diff --git a/app/models/event.rb b/app/models/event.rb index ba04ba20..ff798651 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -273,7 +273,7 @@ class Event < ApplicationRecord biographies: speakers.all? { |speaker| !speaker.biography.blank? }, subtitle: !subtitle.blank?, track: (!track.blank? unless program.tracks.empty?), - difficulty_level: !difficulty_level.blank?, + difficulty_level: (difficulty_level.present? unless program.difficulty_levels.empty?), title: true, abstract: true }.with_indifferent_access diff --git a/app/views/proposals/_tooltip.html.haml b/app/views/proposals/_tooltip.html.haml index 2220451d..4dc2c2aa 100644 --- a/app/views/proposals/_tooltip.html.haml +++ b/app/views/proposals/_tooltip.html.haml @@ -25,6 +25,7 @@ %li{'class'=>class_for_todo(progress_status['track'])} %span{'class'=>icon_for_todo(progress_status['track'])} = link_to 'Add a track', edit_conference_program_proposal_path(event.program.conference.short_title, event) - %li{'class'=>class_for_todo(progress_status['difficulty_level'])} - %span{'class'=>icon_for_todo(progress_status['difficulty_level'])} - = link_to 'Add a difficulty level', edit_conference_program_proposal_path(event.program.conference.short_title, event) + - unless progress_status[:difficulty_level].nil? + %li{'class'=>class_for_todo(progress_status['difficulty_level'])} + %span{'class'=>icon_for_todo(progress_status['difficulty_level'])} + = link_to 'Add a difficulty level', edit_conference_program_proposal_path(event.program.conference.short_title, event)