app/models/spree/banner.rb in spree_banner-1.0.3 vs app/models/spree/banner.rb in spree_banner-1.0.4
- old
+ new
@@ -19,10 +19,10 @@
validates_attachment_content_type :attachment, :content_type => ['image/jpeg', 'image/png', 'image/gif'], :message => "deve essere JPG, JPEG o PNG"
#process_in_background :image UTILE MA OCCORRE ATTIVARE ANCHE LA GEMMA DELAYED-PAPERCLIP
scope :enable, lambda { |category| {:conditions => {:enabled => true, :category => category}} }
# Load S3 settings
- if (Rails.root.join('config', 's3.yml'))
+ if (!YAML.load_file(Rails.root.join('config', 's3.yml'))[Rails.env].blank?)
S3_OPTIONS = {
:storage => 's3',
:s3_credentials => Rails.root.join('config', 's3.yml')
}
elsif (ENV['S3_KEY'] && ENV['S3_SECRET'] && ENV['S3_BUCKET'])