mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 07:39:39 +02:00
Rubocop updates (#1118)
* Minimal code style enforcement * Formatting and lint code updates (no change in functionality)
This commit is contained in:
parent
359bceb58e
commit
eef4c2643b
41 changed files with 529 additions and 519 deletions
|
@ -74,18 +74,18 @@ class User < ApplicationRecord
|
|||
|
||||
private
|
||||
|
||||
def last_user_in_family?
|
||||
family.users.count == 1
|
||||
end
|
||||
|
||||
def deactivated_email
|
||||
email.gsub(/@/, "-deactivated-#{SecureRandom.uuid}@")
|
||||
end
|
||||
|
||||
def profile_image_size
|
||||
if profile_image.attached? && profile_image.byte_size > 5.megabytes
|
||||
# i18n-tasks-use t('activerecord.errors.models.user.attributes.profile_image.invalid_file_size')
|
||||
errors.add(:profile_image, :invalid_file_size, max_megabytes: 5)
|
||||
def last_user_in_family?
|
||||
family.users.count == 1
|
||||
end
|
||||
|
||||
def deactivated_email
|
||||
email.gsub(/@/, "-deactivated-#{SecureRandom.uuid}@")
|
||||
end
|
||||
|
||||
def profile_image_size
|
||||
if profile_image.attached? && profile_image.byte_size > 5.megabytes
|
||||
# i18n-tasks-use t('activerecord.errors.models.user.attributes.profile_image.invalid_file_size')
|
||||
errors.add(:profile_image, :invalid_file_size, max_megabytes: 5)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue