Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix fail with auto completing products from order admin #1303

Closed
wants to merge 1 commit into from

2 participants

@cyu

Moving the product images to the master variant broke the product autocomplete on the edit order form.

@nesquena nesquena referenced this pull request from a commit in nesquena/spree
@cyu cyu Fix fail with auto completing products from order admin
[Fixes #1303]
27ee08e
@tvdeyen tvdeyen referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@tvdeyen tvdeyen referenced this pull request from a commit in magiclabs/spree
@cyu cyu Fix fail with auto completing products from order admin
[Fixes #1303]
ae8b83a
@fonemstr fonemstr referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 23, 2012
  1. @cyu
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  core/app/controllers/spree/admin/products_controller.rb
View
2  core/app/controllers/spree/admin/products_controller.rb
@@ -90,7 +90,7 @@ def collection
@collection = @search.relation.group_by_products_id.includes([:master, {:variants => [:images, :option_values]}]).page(params[:page]).per(Spree::Config[:admin_products_per_page])
else
- includes = [{:variants => [:images, {:option_values => :option_type}]}, :master, :images]
+ includes = [{:variants => [:images, {:option_values => :option_type}]}, {:master => :images}]
@collection = super.where(["name #{LIKE} ?", "%#{params[:q]}%"])
@collection = @collection.includes(includes).limit(params[:limit] || 10)
Something went wrong with that request. Please try again.