Sha256: 964d966e7155e2280d59feee5a3437c35a8f04f6ede3b15ff3d7f4025775ae27

Contents?: true

Size: 249 Bytes

Versions: 4

Compression:

Stored size: 249 Bytes

Contents

Spree::Admin::StockLocationsController.class_eval do

  create.after :set_supplier

  private

  def set_supplier
    if try_spree_current_user.supplier?
      @object.supplier = try_spree_current_user.supplier
      @object.save
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_drop_ship-3.1.3 app/controllers/spree/admin/stock_locations_controller_decorator.rb
spree_drop_ship-3.1.2 app/controllers/spree/admin/stock_locations_controller_decorator.rb
spree_drop_ship-3.1.1 app/controllers/spree/admin/stock_locations_controller_decorator.rb
spree_drop_ship-3.1.0.1 app/controllers/spree/admin/stock_locations_controller_decorator.rb