spree_core 1.2.0 → 1.2.2

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.
Files changed (98) hide show
  1. data/app/assets/javascripts/admin/admin.js.erb +10 -9
  2. data/app/assets/javascripts/admin/checkouts/edit.js +4 -4
  3. data/app/assets/javascripts/admin/product_autocomplete.js.erb +5 -5
  4. data/app/assets/javascripts/admin/taxon_autocomplete.js.erb +34 -0
  5. data/app/assets/javascripts/admin/taxonomy.js +11 -11
  6. data/app/assets/javascripts/store/cart.js.coffee +5 -2
  7. data/app/assets/javascripts/store/checkout.js.coffee +8 -4
  8. data/app/assets/stylesheets/admin/admin-form.css.erb +4 -0
  9. data/app/assets/stylesheets/store/screen.css.scss +1 -1
  10. data/app/controllers/spree/admin/banners_controller.rb +2 -2
  11. data/app/controllers/spree/admin/mail_methods_controller.rb +7 -0
  12. data/app/controllers/spree/admin/orders_controller.rb +3 -1
  13. data/app/controllers/spree/admin/payment_methods_controller.rb +7 -1
  14. data/app/controllers/spree/admin/products_controller.rb +11 -6
  15. data/app/controllers/spree/admin/prototypes_controller.rb +1 -1
  16. data/app/controllers/spree/admin/search_controller.rb +11 -31
  17. data/app/controllers/spree/admin/taxons_controller.rb +8 -0
  18. data/app/controllers/spree/checkout_controller.rb +7 -1
  19. data/app/controllers/spree/home_controller.rb +1 -0
  20. data/app/controllers/spree/orders_controller.rb +18 -5
  21. data/app/controllers/spree/products_controller.rb +1 -0
  22. data/app/controllers/spree/taxons_controller.rb +1 -0
  23. data/app/helpers/spree/admin/general_settings_helper.rb +1 -1
  24. data/app/helpers/spree/base_helper.rb +1 -1
  25. data/app/models/spree/ability.rb +5 -0
  26. data/app/models/spree/app_configuration.rb +1 -0
  27. data/app/models/spree/calculator/price_sack.rb +5 -3
  28. data/app/models/spree/credit_card.rb +2 -2
  29. data/app/models/spree/image.rb +2 -1
  30. data/app/models/spree/inventory_unit.rb +11 -3
  31. data/app/models/spree/line_item.rb +3 -2
  32. data/app/models/spree/order.rb +52 -9
  33. data/app/models/spree/order/checkout.rb +5 -8
  34. data/app/models/spree/payment.rb +1 -1
  35. data/app/models/spree/payment/processing.rb +21 -16
  36. data/app/models/spree/payment_method.rb +1 -1
  37. data/app/models/spree/preference.rb +1 -1
  38. data/app/models/spree/preferences/preferable_class_methods.rb +2 -0
  39. data/app/models/spree/preferences/store.rb +20 -2
  40. data/app/models/spree/product.rb +16 -0
  41. data/app/models/spree/product/scopes.rb +19 -8
  42. data/app/models/spree/return_authorization.rb +1 -0
  43. data/app/models/spree/shipment.rb +6 -4
  44. data/app/models/spree/shipping_method.rb +5 -6
  45. data/app/models/spree/tax_rate.rb +4 -2
  46. data/app/models/spree/taxon.rb +7 -0
  47. data/app/models/spree/variant.rb +26 -15
  48. data/app/views/spree/admin/banners/_gateway.html.erb +14 -0
  49. data/app/views/spree/admin/general_settings/edit.html.erb +13 -4
  50. data/app/views/spree/admin/orders/_form.html.erb +1 -1
  51. data/app/views/spree/admin/orders/customer_details/_form.html.erb +1 -1
  52. data/app/views/spree/admin/product_properties/index.html.erb +1 -1
  53. data/app/views/spree/admin/products/_form.html.erb +7 -8
  54. data/app/views/spree/admin/products/new.html.erb +1 -1
  55. data/app/views/spree/admin/return_authorizations/_form.html.erb +17 -33
  56. data/app/views/spree/admin/search/users.rabl +32 -0
  57. data/app/views/spree/admin/shared/_head.html.erb +3 -13
  58. data/app/views/spree/admin/shared/_routes.html.erb +8 -0
  59. data/app/views/spree/admin/shared/_translations.html.erb +26 -0
  60. data/app/views/spree/admin/tax_rates/_form.html.erb +8 -0
  61. data/app/views/spree/admin/tax_rates/index.html.erb +5 -1
  62. data/app/views/spree/admin/taxonomies/edit.erb +2 -2
  63. data/app/views/spree/admin/taxonomies/get_children.json.erb +1 -1
  64. data/app/views/spree/admin/taxons/search.rabl +5 -0
  65. data/app/views/spree/checkout/_confirm.html.erb +1 -0
  66. data/app/views/spree/checkout/payment/_gateway.html.erb +1 -1
  67. data/app/views/spree/orders/_adjustments.html.erb +1 -1
  68. data/app/views/spree/orders/edit.html.erb +3 -1
  69. data/app/views/spree/products/_cart_form.html.erb +3 -3
  70. data/app/views/spree/products/_thumbnails.html.erb +1 -1
  71. data/app/views/spree/shared/_head.html.erb +0 -2
  72. data/app/views/spree/shared/_order_details.html.erb +2 -2
  73. data/app/views/spree/shared/_products.html.erb +1 -1
  74. data/app/views/spree/shared/_taxonomies.html.erb +1 -1
  75. data/app/views/spree/shipment_mailer/shipped_email.text.erb +1 -1
  76. data/config/initializers/check_for_orphaned_preferences.rb +1 -1
  77. data/config/initializers/rails_5868.rb +8 -0
  78. data/config/locales/en.yml +4 -0
  79. data/config/routes.rb +13 -0
  80. data/db/default/spree/countries.yml +6 -0
  81. data/db/migrate/20120905145253_add_tax_rate_label.rb +5 -0
  82. data/db/migrate/20120905151823_add_toggle_tax_rate_display.rb +5 -0
  83. data/db/migrate/20121009142519_add_lock_version_to_variant.rb +5 -0
  84. data/db/migrate/20121017010007_remove_not_null_constraint_from_products_on_hand.rb +11 -0
  85. data/lib/generators/spree/custom_user/custom_user_generator.rb +4 -1
  86. data/lib/spree/core.rb +3 -2
  87. data/lib/spree/core/mail_settings.rb +2 -1
  88. data/lib/spree/core/permalinks.rb +1 -2
  89. data/lib/spree/core/search/base.rb +1 -0
  90. data/lib/spree/core/testing_support/authorization_helpers.rb +30 -0
  91. data/lib/spree/core/testing_support/factories/product_factory.rb +1 -1
  92. data/lib/spree/core/testing_support/flash.rb +17 -0
  93. data/lib/spree/core/testing_support/preferences.rb +26 -0
  94. data/lib/spree/core/version.rb +1 -1
  95. data/lib/spree/money.rb +4 -1
  96. metadata +69 -46
  97. data/config/initializers/workarounds_for_ruby19.rb +0 -72
  98. data/lib/spree/core/testing_support/env.rb +0 -2
@@ -0,0 +1,32 @@
1
+ object false
2
+ child @users => :users do
3
+ attributes :email, :id
4
+ address_fields = [:firstname, :lastname,
5
+ :address1, :address2,
6
+ :city, :zipcode,
7
+ :phone, :state_name,
8
+ :state_id, :country_id,
9
+ :company]
10
+
11
+ child :ship_address => :ship_address do
12
+ attributes *address_fields
13
+ child :state do
14
+ attributes :name
15
+ end
16
+
17
+ child :country do
18
+ attributes :name
19
+ end
20
+ end
21
+
22
+ child :bill_address => :bill_address do
23
+ attributes *address_fields
24
+ child :state do
25
+ attributes :name
26
+ end
27
+
28
+ child :country do
29
+ attributes :name
30
+ end
31
+ end
32
+ end
@@ -6,22 +6,12 @@
6
6
  <%= stylesheet_link_tag 'admin/all' %>
7
7
  <%= javascript_include_tag 'admin/all' %>
8
8
 
9
- <%= javascript_tag do %>
10
- Spree.routes = <%== {
11
- :product_search => spree.admin_products_path(:format => 'json'),
12
- :product_search_basic => spree.admin_products_path(:format => 'json', :json_format => 'basic', :limit => 10),
13
- :user_search => spree.admin_search_users_path(:format => 'json', :limit => 10)
14
- }.to_json %>;
15
-
16
- strings = <%==
17
- [:no_results, :type_to_search, :searching].
18
- inject({}){|memo, item| {item => t(item) }}.to_json
19
- %>
20
- <% end %>
9
+ <%= render "spree/admin/shared/translations" %>
10
+ <%= render "spree/admin/shared/routes" %>
21
11
 
22
12
  <%= javascript_tag do -%>
23
13
  jQuery.alerts.dialogClass = 'spree';
24
- <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery? %>
14
+ <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %>
25
15
  <% end -%>
26
16
 
27
17
  <%= yield :head %>
@@ -0,0 +1,8 @@
1
+ <script>
2
+ Spree.routes = <%== {
3
+ :product_search => spree.admin_products_path(:format => 'json'),
4
+ :taxon_search => spree.search_admin_taxons_path(:format => 'json'),
5
+ :product_search_basic => spree.admin_products_path(:format => 'json', :json_format => 'basic', :limit => 10),
6
+ :user_search => spree.admin_search_users_path(:format => 'json')
7
+ }.to_json %>;
8
+ </script>
@@ -0,0 +1,26 @@
1
+ <script>
2
+ Spree.translations = <%==
3
+ { :date_picker => I18n.t(:format,
4
+ :scope => 'spree.date_picker',
5
+ :default => 'yy/mm/dd'),
6
+ :abbr_day_names => I18n.t(:abbr_day_names, :scope => :date),
7
+ :month_names => I18n.t(:month_names, :scope => :date).delete_if(&:blank?),
8
+ :previous => I18n.t(:previous),
9
+ :next => I18n.t(:next),
10
+ :no_results => I18n.t(:no_results),
11
+ :type_to_search => I18n.t(:type_to_search),
12
+ :searching => I18n.t(:searching),
13
+ :sku => I18n.t(:sku),
14
+ :on_hand => I18n.t(:on_hand),
15
+ :add => I18n.t(:add),
16
+ :paste => I18n.t(:paste),
17
+ :edit => I18n.t(:edit),
18
+ :rename => I18n.t(:rename),
19
+ :remove => I18n.t(:remove),
20
+ :cut => I18n.t(:cut),
21
+ :loading => I18n.t(:loading),
22
+ :confirm_delete => I18n.t(:confirm_delete),
23
+ :are_you_sure_delete => I18n.t(:are_you_sure_delete)
24
+ }.to_json
25
+ %>
26
+ </script>
@@ -4,6 +4,10 @@
4
4
  <td><%= f.label :zone, t(:zone) %></td>
5
5
  <td><%= f.collection_select(:zone_id, @available_zones, :id, :name) %></td>
6
6
  </tr>
7
+ <tr data-hook="name">
8
+ <td><%= f.label :name, t(:name) %></td>
9
+ <td><%= f.text_field :name %></td>
10
+ </tr>
7
11
  <tr data-hook="category">
8
12
  <td><%= f.label :tax_category_id, t(:tax_category) %></td>
9
13
  <td><%= f.collection_select(:tax_category_id, @available_categories,:id, :name) %></td>
@@ -16,6 +20,10 @@
16
20
  <td><%= f.label :amount, t(:rate) %></td>
17
21
  <td><%= f.text_field :amount %></td>
18
22
  </tr>
23
+ <tr data-hook="show_rate">
24
+ <td><%= f.label :show_rate_in_label, t(:show_rate_in_label) %></td>
25
+ <td><%= f.check_box :show_rate_in_label %></td>
26
+ </tr>
19
27
  </table>
20
28
 
21
29
  <%= render :partial => 'spree/admin/shared/calculator_fields', :locals => { :f => f } %>
@@ -11,9 +11,11 @@
11
11
  <thead>
12
12
  <tr data-hook="rate_header">
13
13
  <th><%= t(:zone) %></th>
14
+ <th><%= t(:name) %></th>
14
15
  <th><%= t(:category) %></th>
15
16
  <th><%= t(:amount) %></th>
16
17
  <th><%= t(:included_in_price) %></th>
18
+ <th><%= t(:show_rate_in_label) %></th>
17
19
  <th><%= t(:calculator) %></th>
18
20
  <th><%= t(:action) %></th>
19
21
  </tr>
@@ -21,10 +23,12 @@
21
23
  <tbody>
22
24
  <% @tax_rates.each do |tax_rate|%>
23
25
  <tr id="<%= spree_dom_id tax_rate %>" data-hook="rate_row">
24
- <td><%=tax_rate.zone.name %></td>
26
+ <td><%=tax_rate.zone.try(:name) || t(:not_available) %></td>
27
+ <td><%=tax_rate.name %></td>
25
28
  <td><%=tax_rate.tax_category.try(:name) || t(:not_available) %></td>
26
29
  <td><%=tax_rate.amount %></td>
27
30
  <td><%=tax_rate.included_in_price %></td>
31
+ <td><%=tax_rate.show_rate_in_label %></td>
28
32
  <td><%=tax_rate.calculator.to_s %></td>
29
33
  <td>
30
34
  <%= link_to_edit tax_rate %> &nbsp;
@@ -28,14 +28,14 @@
28
28
  var initial = [
29
29
  { "attr" :
30
30
  { "id" : "<%= @taxonomy.root.id %>", "rel" : "root" },
31
- "data" : "<%= @taxonomy.root.name %>",
31
+ "data" : "<%= escape_javascript(raw(@taxonomy.root.name)) %>",
32
32
  "state" : "open",
33
33
  "children" : [
34
34
  <% @taxonomy.root.children.each_with_index do |taxon,i| %>
35
35
  {
36
36
  "attr" :
37
37
  { "id" : "<%= taxon.id %>"},
38
- "data" : "<%= taxon.name %>"
38
+ "data" : "<%= escape_javascript(raw(taxon.name)) %>"
39
39
  <% unless taxon.children.empty? %>
40
40
  ,"state" : "closed"
41
41
  <% end %>
@@ -1,7 +1,7 @@
1
1
  [<% @taxons.each_with_index do |t,i| %>
2
2
  { "attr" :
3
3
  { "id" : "<%= t.id %>" },
4
- "data" : "<%= t.name %>"
4
+ "data" : "<%= escape_javascript(raw(t.name)) %>"
5
5
  <% unless t.children.empty? %>
6
6
  ,"state" : "closed"
7
7
  <% end %>
@@ -0,0 +1,5 @@
1
+ object false
2
+ child(@taxons => :taxons) do
3
+ attributes :name, :pretty_name, :id
4
+ end
5
+
@@ -8,4 +8,5 @@
8
8
 
9
9
  <div class="form-buttons" data-hook="buttons">
10
10
  <%= submit_tag t(:place_order), :class => 'continue button primary' %>
11
+ <script>disableSaveOnClick();</script>
11
12
  </div>
@@ -19,7 +19,7 @@
19
19
  <%= select_year(Date.today, :prefix => param_prefix, :field_name => 'year', :start_year => Date.today.year, :end_year => Date.today.year + 15, :class => 'required') %>
20
20
  <span class="required">*</span>
21
21
  </p>
22
- <p class="field" data-hook="cart_code">
22
+ <p class="field" data-hook="card_code">
23
23
  <%= label_tag nil, t(:card_code) %><br />
24
24
  <%= text_field_tag "#{param_prefix}[verification_value]", '', options_hash.merge(:id => 'card_code', :class => 'required', :size => 5) %>
25
25
  <span class="required">*</span>
@@ -1,6 +1,6 @@
1
1
  <thead>
2
2
  <tr data-hook="cart_adjustments_headers">
3
- <th class="cart-adjustment-header" colspan="6">Order Adjustments</th>
3
+ <th class="cart-adjustment-header" colspan="6"><%= t(:order_adjustments) %></th>
4
4
  </tr>
5
5
  </thead>
6
6
  <tbody id="cart_adjustments" data-hook>
@@ -26,7 +26,9 @@
26
26
  <%= button_tag :class => 'primary', :id => 'update-button' do %>
27
27
  <%= t(:update) %>
28
28
  <% end %>
29
- <%= link_to t(:checkout), checkout_state_path(@order.checkout_steps.first), :class => 'button checkout primary', :id => 'checkout-link' %>
29
+ <%= button_tag :class => 'button checkout primary', :id => 'checkout-link', :name => 'checkout' do %>
30
+ <%= t(:checkout) %>
31
+ <% end %>
30
32
  </div>
31
33
 
32
34
  </div>
@@ -1,4 +1,4 @@
1
- <%= form_for :order, :url => populate_orders_url do |f| %>
1
+ <%= form_for :order, :url => populate_orders_path do |f| %>
2
2
  <div id="inside-product-cart-form" data-hook="inside_product_cart_form" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
3
3
 
4
4
  <% if @product.has_variants? %>
@@ -35,9 +35,9 @@
35
35
  </div>
36
36
 
37
37
  <div class="add-to-cart">
38
- <% if @product.has_stock? || Spree::Config[:allow_backorders] %>
38
+ <% if @product.on_sale? %>
39
39
  <%= number_field_tag (@product.has_variants? ? :quantity : "variants[#{@product.master.id}]"),
40
- 1, :class => 'title', :in => 1..@product.on_hand %>
40
+ 1, :class => 'title', :in => 1..@product.on_hand, :min => 1 %>
41
41
  <%= button_tag :class => 'large primary', :id => 'add-to-cart-button', :type => :submit do %>
42
42
  <%= t(:add_to_cart) %>
43
43
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <!-- no need for thumnails unless there is more then one image -->
2
- <% if product.images.size > 1 %>
2
+ <% if product.images.size > 1 || product.variant_images.size > 0 %>
3
3
  <ul id="product-thumbnails" class="thumbnails inline" data-hook>
4
4
  <% product.images.each do |i| %>
5
5
  <li class="tmb-all" id="tmb-<%= i.id.to_s %>"><%= link_to image_tag(i.attachment.url(:mini)), i.attachment.url(:product) %></li>
@@ -1,6 +1,4 @@
1
1
  <meta charset="utf-8">
2
- <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
3
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
4
2
  <title><%= title %></title>
5
3
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
6
4
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1" name="viewport">
@@ -1,5 +1,5 @@
1
1
  <div class="row steps-data">
2
-
2
+
3
3
  <% if order.has_step?("address") %>
4
4
  <div class="columns alpha four">
5
5
  <h6><%= t(:shipping_address) %> <%= link_to "(#{t(:edit)})", checkout_state_path(:address) unless @order.completed? %></h6>
@@ -75,7 +75,7 @@
75
75
  <td data-hook="order_item_description">
76
76
  <h4><%= item.variant.product.name %></h4>
77
77
  <%= truncate(item.variant.product.description, :length => 100, :omission => "...") %>
78
- <%= "(" + variant_options(item.variant) + ")" unless item.variant .option_values.empty? %>
78
+ <%= "(" + item.variant.options_text + ")" unless item.variant.option_values.empty? %>
79
79
  </td>
80
80
  <td data-hook="order_item_price" class="price"><span><%= money item.price %></span></td>
81
81
  <td data-hook="order_item_qty"><%= item.quantity %></td>
@@ -12,7 +12,7 @@
12
12
  <ul id="products" class="inline product-listing" data-hook>
13
13
  <% reset_cycle('default') %>
14
14
  <% products.each do |product| %>
15
- <% if Spree::Config[:show_zero_stock_products] || product.has_stock? %>
15
+ <% if product.on_display? %>
16
16
  <li id="product_<%= product.id %>" class="columns three <%= cycle("alpha", "secondary", "", "omega secondary", :name => "classes") %>" data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
17
17
  <div class="product-image">
18
18
  <%= link_to small_image(product, :itemprop => "image"), product, :itemprop => 'url' %>
@@ -1,6 +1,6 @@
1
1
  <nav id="taxonomies" class="sidebar-item" data-hook>
2
2
  <% get_taxonomies.each do |taxonomy| %>
3
- <h6 class='taxonomy-root'><%= t(:shop_by_taxonomy, :taxonomy => taxonomy.name.singularize) %></h6>
3
+ <h6 class='taxonomy-root'><%= t(:shop_by_taxonomy, :taxonomy => taxonomy.name) %></h6>
4
4
  <%= taxons_tree(taxonomy.root, @taxon, Spree::Config[:max_level_in_taxons_menu] || 1) %>
5
5
  <% end %>
6
6
  </nav>
@@ -6,7 +6,7 @@
6
6
  <%= t('shipment_mailer.shipped_email.shipment_summary') %>
7
7
  ============================================================
8
8
  <% @shipment.manifest.each do |item| %>
9
- <%= item.variant.sku %> <%= item.variant.product.name %> <%= variant_options(item.variant, :include_style => false) %> (<%= item.quantity %>)
9
+ <%= item.variant.sku %> <%= item.variant.product.name %> <%= item.variant.options_text %>
10
10
  <% end %>
11
11
  ============================================================
12
12
 
@@ -1,5 +1,5 @@
1
1
  begin
2
- ActiveRecord::Base.connection.execute("select owner_id, owner_type, name, value from spree_preferences where `key` is null").each do |pref|
2
+ ActiveRecord::Base.connection.execute("SELECT owner_id, owner_type, name, value FROM spree_preferences WHERE 'key' IS NULL").each do |pref|
3
3
  warn "[WARNING] Orphaned preference `#{pref[2]}` with value `#{pref[3]}` for #{pref[1]} with id of: #{pref[0]}, you should reset the preference value manually."
4
4
  end
5
5
  rescue
@@ -0,0 +1,8 @@
1
+ # Temporary fix for
2
+ # NoMethodError: undefined method `gsub' for #<Arel::Nodes::Ascending:...>
3
+ # See https://github.com/rails/rails/issues/5868
4
+ class Arel::Nodes::Ordering
5
+ def gsub(*a, &b)
6
+ to_sql.gsub(*a, &b)
7
+ end
8
+ end
@@ -108,6 +108,7 @@ en:
108
108
  spree/tax_rate:
109
109
  amount: Rate
110
110
  included_in_price: Included in Price
111
+ show_rate_in_label: Show rate in label
111
112
  spree/taxon:
112
113
  name: Name
113
114
  permalink: Permalink
@@ -335,6 +336,7 @@ en:
335
336
  credits: Credits
336
337
  current: Current
337
338
  currency: Currency
339
+ currency_symbol_position: "Put currency symbol before or after dollar amount?"
338
340
  customer: Customer
339
341
  customer_details: "Customer Details"
340
342
  customer_details_updated: "The customer's details have been updated."
@@ -603,6 +605,7 @@ en:
603
605
  or: or
604
606
  or_over_price: "%{price} or over"
605
607
  order: Order
608
+ order_adjustments: "Order adjustments"
606
609
  order_confirmation_note: ""
607
610
  order_date: "Order Date"
608
611
  order_details: "Order Details"
@@ -697,6 +700,7 @@ en:
697
700
  please_create_user: "Please create a user account"
698
701
  please_define_payment_methods: "Please define some payment methods first."
699
702
  powered_by: "Powered by"
703
+ populate_get_error: "Something went wrong. Please try adding the item again."
700
704
  presentation: Presentation
701
705
  preview: Preview
702
706
  previous: Previous
@@ -15,6 +15,13 @@ Spree::Core::Engine.routes.draw do
15
15
  get '/checkout/:state', :to => 'checkout#edit', :as => :checkout_state
16
16
  get '/checkout', :to => 'checkout#edit' , :as => :checkout
17
17
 
18
+ populate_redirect = redirect do |params, request|
19
+ request.flash[:error] = I18n.t(:populate_get_error)
20
+ request.referer || '/cart'
21
+ end
22
+
23
+ get '/orders/populate', :via => :get, :to => populate_redirect
24
+
18
25
  resources :orders do
19
26
  post :populate, :on => :collection
20
27
 
@@ -143,6 +150,12 @@ Spree::Core::Engine.routes.draw do
143
150
  resources :taxons
144
151
  end
145
152
 
153
+ resources :taxons, :only => [] do
154
+ collection do
155
+ get :search
156
+ end
157
+ end
158
+
146
159
  resources :reports, :only => [:index, :show] do
147
160
  collection do
148
161
  get :sales_total
@@ -1581,3 +1581,9 @@ countries_171:
1581
1581
  iso_name: SAINT KITTS AND NEVIS
1582
1582
  id: "171"
1583
1583
  numcode: "659"
1584
+ countries_998:
1585
+ name: Serbia
1586
+ iso3: SRB
1587
+ iso: RS
1588
+ id: "998"
1589
+ numcode: "999"
@@ -0,0 +1,5 @@
1
+ class AddTaxRateLabel < ActiveRecord::Migration
2
+ def change
3
+ add_column :spree_tax_rates, :name, :string
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddToggleTaxRateDisplay < ActiveRecord::Migration
2
+ def change
3
+ add_column :spree_tax_rates, :show_rate_in_label, :boolean, :default => true
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddLockVersionToVariant < ActiveRecord::Migration
2
+ def change
3
+ add_column :spree_variants, :lock_version, :integer, :default => 0
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class RemoveNotNullConstraintFromProductsOnHand < ActiveRecord::Migration
2
+ def up
3
+ change_column :spree_products, :count_on_hand, :integer, :null => true
4
+ change_column :spree_variants, :count_on_hand, :integer, :null => true
5
+ end
6
+
7
+ def down
8
+ change_column :spree_products, :count_on_hand, :integer, :null => false
9
+ change_column :spree_variants, :count_on_hand, :integer, :null => false
10
+ end
11
+ end
@@ -27,7 +27,10 @@ module Spree
27
27
 
28
28
  file_action = File.exist?('config/initializers/spree.rb') ? :append_file : :create_file
29
29
  send(file_action, 'config/initializers/spree.rb') do
30
- %Q{require 'spree/authentication_helpers'\n}
30
+ %Q{
31
+ Rails.application.config.to_prepare do
32
+ require_dependency 'spree/authentication_helpers'
33
+ end\n}
31
34
  end
32
35
  end
33
36
 
@@ -31,7 +31,7 @@ require 'rails/generators'
31
31
  require 'state_machine'
32
32
  require 'paperclip'
33
33
  require 'kaminari'
34
- require 'nested_set'
34
+ require 'awesome_nested_set'
35
35
  require 'acts_as_list'
36
36
  require 'active_merchant'
37
37
  require 'ransack'
@@ -40,6 +40,7 @@ require 'deface'
40
40
  require 'cancan'
41
41
  require 'select2-rails'
42
42
  require 'spree/money'
43
+ require 'rabl'
43
44
 
44
45
  module Spree
45
46
 
@@ -105,7 +106,7 @@ ActiveRecord::Base.class_eval do
105
106
  end
106
107
 
107
108
  if defined?(ActionView)
108
- require 'nested_set/helper'
109
+ require 'awesome_nested_set/helper'
109
110
  ActionView::Base.class_eval do
110
111
  include CollectiveIdea::Acts::NestedSet::Helper
111
112
  end