provideal/tabulatr — comment on commit 331aee373400c3f96feedb9cdc280af6b52e3afe
File:  line 0
By moabite:

here's a regression problem: line 31 in order_for_query of lib/tabulatr/tabulatr/adapter/active_record.rb:

context.values.join(" ") if context

isn't always putting the column name before the direction, e.g. usually I get 'asc lastname' rather than 'lastname asc', although not always.

Would

"#{context[:by]} #{context[:direction]}" if context

be better?

Also, I don't have mongoid handy, but line 24 (also order_for_query) of lib/tabulatr/tabulatr/adapter/mongoid.rb:

context.values.map(&:to_s) if context

is returning an array rather than a string, which seems odd to my un-mongoid-trained eye.