Open W0lfbane opened 8 years ago
This can be fixed by just including validates_attachment
and adding a migration for logo_content_type
to the Spree::Store
model.
Migration
class AddLogoContentTypeForStore < ActiveRecord::Migration
def change
add_column :spree_stores, :logo_content_type, :string
end
end
store_decorator.rb
Spree::Store.class_eval do
validates_attachment :logo, content_type: { content_type: %w(image/jpeg image/jpg image/png image/gif) }
end
Trying to add a new logo for a domain. I am using stable build 3.1. Whenever I attempt to add a logo, I get this error:
A previous issue submitted by a user shows that adding a validation to store_decorator.rb fixes the problem, however it looks like that already exists in my case:
What am I doing wrong?