Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

#siblings dies when no :order specified #23

Closed
wants to merge 1 commit into from

2 participants

@garygreyling

Fix an issue where #siblings crashes with no method error for #quoted_order_column when acts_as_tree was called with no :order option.

@mceachen
Owner

Sweet! I added a failing test: http://travis-ci.org/#!/mceachen/closure_tree/builds/2531476 and pulled your change for this build: http://travis-ci.org/#!/mceachen/closure_tree/builds/2531513

This will be released as v3.6.2 as soon as travis passes.

Thanks!

@mceachen mceachen closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 21, 2012
  1. @garygreyling
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/closure_tree/acts_as_tree.rb
View
2  lib/closure_tree/acts_as_tree.rb
@@ -182,7 +182,7 @@ def descendant_ids
def self_and_siblings
s = ct_base_class.where(parent_column_sym => parent)
- quoted_order_column ? s.order(quoted_order_column) : s
+ order_option.present? ? s.order(quoted_order_column) : s
end
def siblings
Something went wrong with that request. Please try again.