mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 16:39:52 +01:00
text/css
This commit is contained in:
parent
18d4cf116f
commit
741bee22a0
1 changed files with 4 additions and 4 deletions
|
@ -16,11 +16,11 @@ class Theme < ActiveRecord::Base
|
|||
allow_nil: true, only_integer: true
|
||||
|
||||
has_attached_file :css, use_timestamp: false, s3_headers: {
|
||||
'Content-Type': 'text/stylesheet'
|
||||
'Content-Type': 'text/css'
|
||||
}, fog_file: {
|
||||
content_type: 'text/stylesheet'
|
||||
content_type: 'text/css'
|
||||
}
|
||||
validates_attachment_content_type :css, content_type: /text\/(x-c|stylesheet)/
|
||||
validates_attachment_content_type :css, content_type: /text\/(x-c|css)/
|
||||
|
||||
before_save do
|
||||
self.css = nil
|
||||
|
@ -31,7 +31,7 @@ class Theme < ActiveRecord::Base
|
|||
attr_accessor :original_filename, :content_type
|
||||
}
|
||||
|
||||
style.content_type = 'text/stylesheet'
|
||||
style.content_type = 'text/css'
|
||||
style.original_filename = 'theme.css'
|
||||
|
||||
self.css = style
|
||||
|
|
Loading…
Reference in a new issue