style: if ! changed by unless
- if ! changed by unless as it is more readable - !object.blank? is equivalent to object.present?, also more readable
This commit is contained in:
parent
96155eb87f
commit
7e5d20c89d
18 changed files with 27 additions and 28 deletions
|
|
@ -106,13 +106,13 @@
|
|||
%td
|
||||
= @event.language
|
||||
|
||||
- if !@event.room.nil?
|
||||
- unless @event.room.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Room
|
||||
%td
|
||||
= @event.room.name
|
||||
- if !@event.start_time.nil?
|
||||
- unless @event.start_time.nil?
|
||||
%tr
|
||||
%td
|
||||
%b Scheduled time
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
- bgcolor=""
|
||||
%td{:style=>"background-color: #{bgcolor}"}
|
||||
- if @program.show_voting?
|
||||
- if !event.submitter.nil?
|
||||
- unless event.submitter.nil?
|
||||
=link_to event.submitter.name, admin_user_path(event.submitter)
|
||||
- if event.submitter.registrations.count < 1
|
||||
(Unregistered!)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
- @event.versions.each do |version|
|
||||
%tr
|
||||
%td
|
||||
- if !version.whodunnit.nil?
|
||||
- unless version.whodunnit.nil?
|
||||
= User.find(version.whodunnit).name
|
||||
- else
|
||||
No user (probably via the console)
|
||||
|
|
@ -35,4 +35,3 @@
|
|||
- version.changeset.each_key do |key|
|
||||
= "#{key}: #{version.changeset[key][0]} -> #{version.changeset[key][1]}"
|
||||
%br
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
- slice.each do |lodging|
|
||||
.col-md-4
|
||||
.thumbnail
|
||||
- if !lodging.picture?
|
||||
- unless lodging.picture?
|
||||
%p.text-center
|
||||
%i.fa.fa-home.fa-5x
|
||||
- else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue