diff options
author | alpaca-tc <alpaca-tc@alpaca.tc> | 2017-05-19 18:41:45 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-19 11:41:45 +0200 |
commit | 198ae3e36688e6282c6d1a699b4e1874d642f1e9 (patch) | |
tree | 64b1770e564d62407ed18fa8b94c27522265d296 /app/models/concerns/account_header.rb | |
parent | 6e4c7d62118d5d1f2e966950edfdbc80cebd4d7c (diff) |
Define instance method outside #included (#3128)
Diffstat (limited to 'app/models/concerns/account_header.rb')
-rw-r--r-- | app/models/concerns/account_header.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/concerns/account_header.rb b/app/models/concerns/account_header.rb index 4d96e990a..4ba9212a2 100644 --- a/app/models/concerns/account_header.rb +++ b/app/models/concerns/account_header.rb @@ -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 |