Skip to content

Instantly share code, notes, and snippets.

@pnomolos
Created June 20, 2009 18:40
Show Gist options
  • Save pnomolos/133234 to your computer and use it in GitHub Desktop.
Save pnomolos/133234 to your computer and use it in GitHub Desktop.
module DataMapper
class Query
alias :old_assert_valid_order :assert_valid_order
def assert_valid_order(order, fields)
old_assert_valid_order(order, fields) unless !order.nil? && order.any? { |p| p.is_a?(Direction) && p.property.name == :sort_order }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment