spree_zone_pricing 0.1.51 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  class CurrencyPrice < ActiveRecord::Base
2
2
 
3
- validates_presence_of :variant_id
4
- validates_presence_of :currency
5
- validates_uniqueness_of :variant_id, :scope => [:currency]
3
+ validates_presence_of :variant_id
4
+ validates_presence_of :currency
5
+ validates_uniqueness_of :variant_id, :scope => [:currency]
6
6
 
7
- def self.currency_types
7
+ def self.currency_types
8
8
  [
9
9
  "USD",
10
10
  "GBP",
@@ -0,0 +1,7 @@
1
+ class ZoneCurrency < ActiveRecord::Base
2
+
3
+ validates_presence_of :zone_id
4
+ validates_presence_of :currency
5
+ validates_uniqueness_of :zone_id, :scope => [:currency]
6
+
7
+ end
@@ -1,2 +1,2 @@
1
1
  <!-- insert_bottom 'ul[data-hook=admin_tabs]' -->
2
- <%= tab :zone_prices, :zone_currencies, :currency_prices, :label => "Zone Prices" %>
2
+ <%= tab :zone_currencies, :currency_prices, :label => "Zone Currencies" %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_zone_pricing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.51
4
+ version: 0.1.52
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -22,8 +22,7 @@ files:
22
22
  - app/controllers/spree/admin/variants_controller_decorator.rb
23
23
  - app/controllers/spree/admin/zone_prices_controller.rb
24
24
  - app/models/currency_price.rb
25
- - app/models/variant_decorator.rb
26
- - app/models/zone_decorator.rb
25
+ - app/models/zone_currency.rb
27
26
  - app/views/spree/admin/zone_prices/_form.html.erb
28
27
  - app/views/spree/admin/zone_prices/edit.html.erb
29
28
  - app/views/spree/admin/zone_prices/index.html.erb
@@ -1,3 +0,0 @@
1
- Spree::Variant.class_eval do
2
- has_many: zone_prices
3
- end
@@ -1,3 +0,0 @@
1
- Spree::Zone.class_eval do
2
- has_many: zone_prices
3
- end