parse "fits:8-bit-chomby" as "fits 8-bit chomby" rather than "fits 8 bit"
The "fits:8-bit-chomby" search filter was being read as color=8, species=bit. Now, we split from the right-hand side of the filter instead. Still a problem for anyone who explicitly types the Spanish/Portuguese ordering of "fits:chomby-8-bits", but I'm okay with this cheap fix, since I bet literally nobody has done that in the past month, if ever :P
This commit is contained in:
parent
0e6f823154
commit
9ca68b02b2
1 changed files with 1 additions and 1 deletions
|
@ -171,7 +171,7 @@ class Item
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
:pet_type => lambda { |keyword|
|
:pet_type => lambda { |keyword|
|
||||||
name1, name2 = keyword.split('-')
|
name1, dash, name2 = keyword.rpartition('-')
|
||||||
[[name1, name2], [name2, name1]].each do |species_name, color_name|
|
[[name1, name2], [name2, name1]].each do |species_name, color_name|
|
||||||
species = Species.find_by_name(species_name)
|
species = Species.find_by_name(species_name)
|
||||||
next if species.nil?
|
next if species.nil?
|
||||||
|
|
Loading…
Reference in a new issue