Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem in variant_decorator about RansackTranslator.new #686

Open
orbit-dna opened this issue Jul 30, 2016 · 0 comments
Open

problem in variant_decorator about RansackTranslator.new #686

orbit-dna opened this issue Jul 30, 2016 · 0 comments

Comments

@orbit-dna
Copy link

orbit-dna commented Jul 30, 2016

I'm using 3-0-stable, and found this:
in app/models/spree/variant_decorator.rb line: 6 :

translated_params = SpreeI18n::RansackTranslator.new(self, params).translated_params

while in app/models/spree_i18n/translatable.rb line: 15 :

translated_params = RansackTranslator.new(self, params || {}).translated_params

notice the missing || {} in app/models/spree/variant_decorator.rb.
This causes an exception: "undefined method `each_with_object' for nil:NilClass", when params is nil.
So, I'm not sure is it a bug or something else ?
or should I check params before pass it to Spree::Variant.ransack ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant