spree_zone_pricing 0.1.64 → 0.1.65
Sign up to get free protection for your applications and to get access to all the features.
data/app/models/zone_currency.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
class ZoneCurrency < ActiveRecord::Base
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
validates_presence_of :zone_id
|
4
|
+
validates_presence_of :currency
|
5
|
+
validates_length_of :currency, :maximum => 3
|
6
|
+
validates_length_of :currency, :minimum => 3
|
7
|
+
validates_format_of :currency, :with => /[A-Z]/, :message => " must have one upper case"
|
8
|
+
#validates_uniqueness_of :zone_id, :scope => [:currency]
|
9
|
+
validates_uniqueness_of :zone_id
|
7
10
|
|
8
11
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<h1>Listing Currency Prices</h1>
|
2
2
|
|
3
|
-
<!--
|
4
3
|
<% content_for :sidebar do %>
|
5
|
-
<%=
|
6
|
-
|
7
|
-
|
4
|
+
<%=
|
5
|
+
#render :partial => 'spree/admin/shared/sidebar_zone_currencies', :locals => { :selected => "currency_prices" }
|
6
|
+
%>
|
7
|
+
<% end %>
|
@@ -26,8 +26,8 @@
|
|
26
26
|
|
27
27
|
<%= paginate @zone_currencies %>
|
28
28
|
|
29
|
-
<!--
|
30
29
|
<% content_for :sidebar do %>
|
31
|
-
<%=
|
32
|
-
|
33
|
-
|
30
|
+
<%=
|
31
|
+
#render :partial => 'spree/admin/shared/sidebar_zone_currencies', :locals => { :selected => "zone_currencies" }
|
32
|
+
%>
|
33
|
+
<% end %>
|