Chore: Remove deprecation warning post rails upgrade (#7080)
Fixes: https://linear.app/chatwoot/issue/CW-1575/fix-deprecations-post-upgrade-to-rails-7
This commit is contained in:
@@ -56,7 +56,7 @@ class Attachment < ApplicationRecord
|
||||
|
||||
# NOTE: for External services use this methods since redirect doesn't work effectively in a lot of cases
|
||||
def download_url
|
||||
ActiveStorage::Current.host = Rails.application.routes.default_url_options[:host] if ActiveStorage::Current.host.blank?
|
||||
ActiveStorage::Current.url_options = Rails.application.routes.default_url_options if ActiveStorage::Current.url_options.blank?
|
||||
file.attached? ? file.blob.url : ''
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user