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
|
|
@ -44,7 +44,7 @@ class Venue < ActiveRecord::Base
|
|||
def generate_guid
|
||||
loop do
|
||||
@guid = SecureRandom.urlsafe_base64
|
||||
break if !Venue.where(guid: guid).any?
|
||||
break unless Venue.where(guid: guid).any?
|
||||
end
|
||||
self.guid = @guid
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue