We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When setting the order column a string must be used, using a symbol won't work.
Works
acts_as_tree order: 'position'
It doesn't
acts_as_tree order: :position
I don't have a good explanation for why would this be better, other than it feels more natural and it wouldn't take much, changing:
https://github.com/mceachen/closure_tree/blob/master/lib/closure_tree/columns.rb#L71
# c = ct_class.columns_hash[order_option] c = ct_class.columns_hash[order_option.to_s]
Should work with both strings and symbols.
UPDATE I'm fairly new to testing, but a failing test could look something like this:
# spec/support/models.rb class OtherLabel < Label acts_as_tree :order => :sort_order end # spec/label_spec.rb context "OtherLabel" do it "should include DeterministicNumericOrdering" do OtherLabel.include?(ClosureTree::DeterministicNumericOrdering).should be_true end end
The text was updated successfully, but these errors were encountered:
OK. I'll do this after I get #49 squared away.
Sorry, something went wrong.
a0b0ef8
This is released in 4.0.1.
No branches or pull requests
When setting the order column a string must be used, using a symbol won't work.
Works
It doesn't
I don't have a good explanation for why would this be better, other than it feels more natural and it wouldn't take much, changing:
https://github.com/mceachen/closure_tree/blob/master/lib/closure_tree/columns.rb#L71
Should work with both strings and symbols.
UPDATE
I'm fairly new to testing, but a failing test could look something like this:
The text was updated successfully, but these errors were encountered: