Define instance method outside #included (#3128)
This commit is contained in:
parent
6e4c7d6211
commit
198ae3e366
5 changed files with 103 additions and 105 deletions
|
@ -20,13 +20,13 @@ module AccountHeader
|
|||
has_attached_file :header, styles: ->(f) { header_styles(f) }, convert_options: { all: '-quality 80 -strip' }
|
||||
validates_attachment_content_type :header, content_type: IMAGE_MIME_TYPES
|
||||
validates_attachment_size :header, less_than: 2.megabytes
|
||||
end
|
||||
|
||||
def header_original_url
|
||||
header.url(:original)
|
||||
end
|
||||
def header_original_url
|
||||
header.url(:original)
|
||||
end
|
||||
|
||||
def header_static_url
|
||||
header_content_type == 'image/gif' ? header.url(:static) : header_original_url
|
||||
end
|
||||
def header_static_url
|
||||
header_content_type == 'image/gif' ? header.url(:static) : header_original_url
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue