Chore: Add Facebook app set up documentation (#647)
Co-authored-by: Pranav Raj S <pranavrajs@gmail.com>
This commit is contained in:
@@ -30,6 +30,18 @@ class Attachment < ApplicationRecord
|
||||
base_data.merge(file_metadata)
|
||||
end
|
||||
|
||||
def file_url
|
||||
file.attached? ? url_for(file) : ''
|
||||
end
|
||||
|
||||
def thumb_url
|
||||
if file.attached? && file.representable?
|
||||
url_for(file.representation(resize: '250x250'))
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def file_metadata
|
||||
@@ -64,16 +76,4 @@ class Attachment < ApplicationRecord
|
||||
account_id: account_id
|
||||
}
|
||||
end
|
||||
|
||||
def file_url
|
||||
file.attached? ? url_for(file) : ''
|
||||
end
|
||||
|
||||
def thumb_url
|
||||
if file.attached? && file.representable?
|
||||
url_for(file.representation(resize: '250x250'))
|
||||
else
|
||||
''
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user