chore: Upgrade to Rails 7 (#6719)

fixes: #6736
This commit is contained in:
Sojan Jose
2023-05-06 10:44:52 +05:30
committed by GitHub
parent 59433d9d3c
commit 022383d942
53 changed files with 1696 additions and 682 deletions

View File

@@ -62,7 +62,7 @@ class Attachment < ApplicationRecord
def thumb_url
if file.attached? && file.representable?
url_for(file.representation(resize: '250x250'))
url_for(file.representation(resize_to_fill: [250, nil]))
else
''
end

View File

@@ -11,7 +11,7 @@ module Avatarable
end
def avatar_url
return url_for(avatar.representation(resize: '250x250')) if avatar.attached? && avatar.representable?
return url_for(avatar.representation(resize_to_fill: [250, nil])) if avatar.attached? && avatar.representable?
''
end

View File

@@ -10,7 +10,7 @@ module Pubsubable
def pubsub_token
# backfills tokens for existing records
regenerate_pubsub_token if self[:pubsub_token].blank?
regenerate_pubsub_token if self[:pubsub_token].blank? && persisted?
self[:pubsub_token]
end
end