Merge pull request #1221 from nishanthvijayan/commercial-missing-version

Check if commercial has versions before displaying commercial creator
This commit is contained in:
Stella Rouzi 2016-11-22 11:05:01 +02:00 committed by GitHub
commit f30dd52edc

View file

@ -40,6 +40,7 @@
- if can? :destroy, commercial - if can? :destroy, commercial
= link_to 'Delete', conference_program_proposal_commercial_path(@conference.short_title, @event.id, commercial.id), = link_to 'Delete', conference_program_proposal_commercial_path(@conference.short_title, @event.id, commercial.id),
:method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger' :method => :delete, :data => { :confirm => 'Are you sure?' }, class: 'btn btn-danger'
.text-right - if commercial.versions.any?
= "added by " .text-right
= link_to_user(commercial.versions.last.whodunnit) = "added by "
= link_to_user(commercial.versions.last.whodunnit)