sortable
sortable copied to clipboard
LoadError in 1.9, generator.rb gone
generator.rb has been removed from Ruby 1.9, so when trying to use sortable under 1.9, it fails with a LoadError. sortable.rb isn't really making much use of Generator's features, though, so the patch to fix the issue is pretty simple.
0a1,2
> require 'generator'
>
211c213,214
< search_array.each_with_index do |col,i|
---
> g = Generator.new(search_array)
> g.each do |col|
213c216
< columns_to_search += 'OR ' unless i == search_array.length - 1
---
> columns_to_search += 'OR ' unless g.end?
259c262,263
< sort_array.each_with_index do |sort_value,i|
---
> g = Generator.new(sort_array)
> g.each do |sort_value|
261c265
< result += ', ' unless i == sort_array.length - 1
---
> result += ', ' unless g.end?
Hey sorry I haven't been monitoring this.. I'll go ahead and apply this patch.. appreciate it