Issue 7: Autocompletion of related products when editing products is broken
Status:  Fixed
Owner: ----
Closed:  Feb 2008
Reported by edmundo...@gmail.com, Feb 10, 2008
What steps will reproduce the problem?
1. Open the administration interface and having some products try to edit one.
2. Go to the "Related Products" fields at the right and try to start
filling with a name or code of another product.

What is the expected output? What do you see instead?
Should drop-down a list to choose a product, but nothing happens.

What version of the product are you using? On what operating system?
substruct_rel_0-97

Feb 10, 2008
#1 edmundo...@gmail.com
Console shows:

NoMethodError (You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]=):
    /vendor/plugins/substruct/app/controllers/admin/products_controller.rb:187:in
`suggestion_js'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1158:in `send'
    /vendor/rails/actionpack/lib/action_controller/base.rb:1158:in
`perform_action_without_filters'
...
Feb 10, 2008
#2 edmundo...@gmail.com
@headers['content-type'] = 'text/javascript'

must be changed to

headers['content-type'] = 'text/javascript'

@headers was deprecated we must to use headers instead.
Feb 10, 2008
Project Member #3 subim...@gmail.com
Thanks for the heads up. Fixed:

https://code.google.com/p/substruct/source/detail?r=25

Status: Fixed