This commit is contained in:
Yuki 2015-08-26 01:05:56 +05:30
parent 18d4cf116f
commit 741bee22a0
1 changed files with 4 additions and 4 deletions

View File

@ -16,11 +16,11 @@ class Theme < ActiveRecord::Base
allow_nil: true, only_integer: true allow_nil: true, only_integer: true
has_attached_file :css, use_timestamp: false, s3_headers: { has_attached_file :css, use_timestamp: false, s3_headers: {
'Content-Type': 'text/stylesheet' 'Content-Type': 'text/css'
}, fog_file: { }, 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 before_save do
self.css = nil self.css = nil
@ -31,7 +31,7 @@ class Theme < ActiveRecord::Base
attr_accessor :original_filename, :content_type attr_accessor :original_filename, :content_type
} }
style.content_type = 'text/stylesheet' style.content_type = 'text/css'
style.original_filename = 'theme.css' style.original_filename = 'theme.css'
self.css = style self.css = style