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
|
|
@ -7,7 +7,7 @@ class Contact < ActiveRecord::Base
|
|||
format: URI::regexp(%w(http https)), allow_blank: true
|
||||
|
||||
def has_social_media?
|
||||
return true if !facebook.blank? || !twitter.blank? || !googleplus.blank? || !instagram.blank? || !email.blank?
|
||||
return true if facebook.present? || twitter.present? || googleplus.present? || instagram.present? || email.present?
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue