Sha256: d91fa6fd3a53893c72e6ea3604a51734b2b3c5d1a6b5f3cec38b137f8b72cdcf

Contents?: true

Size: 360 Bytes

Versions: 1

Compression:

Stored size: 360 Bytes

Contents

Admin::ShippingMethodsController.class_eval do
  
  before_filter :load_data
  
  private

  # overriding to return an array of Calculator objects instead of a Set
  def load_data
    @available_zones = Zone.find :all, :order => :name
    @calculators = []
    ShippingMethod.calculators.each {|calc|
      @calculators << eval(calc.name).new  
    }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spree_active_shipping-1.0.0 app/controllers/admin/shipping_methods_controller_decorator.rb