spree_zone_pricing 0.1.55 → 0.1.56
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,17 @@
|
|
1
1
|
class Spree::Admin::ZoneCurrenciesController < Spree::Admin::BaseController
|
2
2
|
|
3
3
|
def index
|
4
|
+
zones = Zone.all
|
5
|
+
zones.each do |zone|
|
6
|
+
zone_currency = ZoneCurrency.find_by_zone_id(zone.id)
|
7
|
+
if !zone_currency.nil?
|
8
|
+
zone_currency = ZoneCurrency.new
|
9
|
+
zone_currency.zone_id = zone.id
|
10
|
+
zone_currency.currency = CurrencyPrice.currency_types[0]
|
11
|
+
zone_currency.save
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
4
15
|
@zone_currencies = ZoneCurrency.page(params[:page]||1).per(20)
|
5
16
|
end
|
6
17
|
|