mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-22 22:59:39 +02:00
Fix initials + profile pictures (#2186)
* Improve initials + profile pictures * Change to url_options
This commit is contained in:
parent
17fa5413f6
commit
194dad702d
6 changed files with 18 additions and 8 deletions
|
@ -4,6 +4,7 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
before_action :detect_os
|
||||
before_action :set_default_chat
|
||||
before_action :set_active_storage_url_options
|
||||
|
||||
private
|
||||
def detect_os
|
||||
|
@ -23,4 +24,12 @@ class ApplicationController < ActionController::Base
|
|||
@last_viewed_chat = Current.user&.last_viewed_chat
|
||||
@chat = @last_viewed_chat
|
||||
end
|
||||
|
||||
def set_active_storage_url_options
|
||||
ActiveStorage::Current.url_options = {
|
||||
protocol: request.protocol,
|
||||
host: request.host,
|
||||
port: request.optional_port
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue