Sha256: 20b80f0abde6c88f159beef9c8049d178080b9fa4191bdf95f6ea386fe79b605

Contents?: true

Size: 411 Bytes

Versions: 5

Compression:

Stored size: 411 Bytes

Contents

if defined?(Ckeditor::PicturesController)
  Ckeditor::PicturesController.class_eval do
    load_and_authorize_resource :class => 'Ckeditor::Picture'
    after_filter :set_supplier, only: [:create]

    def index
    end

    private
    def set_supplier
      if spree_current_user.supplier? and @picture
        @picture.supplier = spree_current_user.supplier
        @picture.save
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
solidus_marketplace-0.1.0 app/controllers/ckeditor/pictures_controller_decorator.rb
spree_drop_ship-3.1.3 app/controllers/ckeditor/pictures_controller_decorator.rb
spree_drop_ship-3.1.2 app/controllers/ckeditor/pictures_controller_decorator.rb
spree_drop_ship-3.1.1 app/controllers/ckeditor/pictures_controller_decorator.rb
spree_drop_ship-3.1.0.1 app/controllers/ckeditor/pictures_controller_decorator.rb