difficulty level code redundancy is removed

This commit is contained in:
Naman Gupta 2017-10-22 13:09:43 +05:30
parent d00dc631f8
commit 15813f9be6
2 changed files with 10 additions and 10 deletions

View file

@ -207,7 +207,15 @@
- when 'DifficultyLevel'
difficulty level
= link_to_difficulty_level(version)
- difficulty_level = DifficultyLevel.find_by(id: version.item_id)
- if difficulty_level.nil?
= 'Difficulty Level Deleted'
- else
- conference = Conference.find_by(id: version.conference_id)
- unless conference.nil?
= link_to difficulty_level.title, admin_conference_program_difficulty_levels_path(conference.short_title)
- else
= difficulty_level.title
- when 'Splashpage'
= link_if_alive version, 'splashpage',