spree_promo 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,10 +9,6 @@ Spree::Order.class_eval do
9
9
  !! adjustments.promotion.reload.detect { |credit| credit.originator.promotion.id == promotion.id }
10
10
  end
11
11
 
12
- def products
13
- line_items.map {|li| li.variant.product}
14
- end
15
-
16
12
  unless self.method_defined?('update_adjustments_with_promotion_limiting')
17
13
  def update_adjustments_with_promotion_limiting
18
14
  update_adjustments_without_promotion_limiting
@@ -1,4 +1,17 @@
1
- <%= render :partial => 'spree/shared/error_messages', :locals => { :target => @promotion } %>
1
+ <% if @promotion && (@promotion.errors.any? || @promotion.rules.any? { |r| r.errors.any? }) %>
2
+ <% error_group = [@promotion.errors, @promotion.rules.map(&:errors)].flatten %>
3
+ <div id="errorExplanation" class="errorExplanation" data-hook>
4
+ <h2><%= t(:errors_prohibited_this_record_from_being_saved, :count => error_group.count) %>:</h2>
5
+ <p><%= t(:there_were_problems_with_the_following_fields) %>:</p>
6
+ <ul>
7
+ <% error_group.each do |errors| %>
8
+ <% errors.full_messages.each do |msg| %>
9
+ <li><%= msg %></li>
10
+ <% end %>
11
+ <% end %>
12
+ </ul>
13
+ </div>
14
+ <% end %>
2
15
  <fieldset id="general_fields">
3
16
  <legend><%= t(:general) %></legend>
4
17
  <%= f.field_container :name do %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_promo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,30 +9,30 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-05 00:00:00.000000000 Z
12
+ date: 2012-07-27 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: spree_core
16
- requirement: &70215910237120 !ruby/object:Gem::Requirement
16
+ requirement: &70299252260320 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
20
20
  - !ruby/object:Gem::Version
21
- version: 1.1.2
21
+ version: 1.1.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70215910237120
24
+ version_requirements: *70299252260320
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: spree_auth
27
- requirement: &70215910235320 !ruby/object:Gem::Requirement
27
+ requirement: &70299252259720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
31
31
  - !ruby/object:Gem::Version
32
- version: 1.1.2
32
+ version: 1.1.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70215910235320
35
+ version_requirements: *70299252259720
36
36
  description: Required dependency for Spree
37
37
  email: david@spreecommerce.com
38
38
  executables: []
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  segments:
134
134
  - 0
135
- hash: -24560391038140194
135
+ hash: -2084238401508216031
136
136
  requirements:
137
137
  - none
138
138
  rubyforge_project: