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
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue