Closed natebird closed 6 years ago
I'm open to also creating a per column option. But I'm unsure where that would go and how to pass it to the SimpleOrder class. Any ideas would be helpful. Thanks!
well, you have to add method a public into column.rb
def nulls_last
@view_column.fetch(:nulls_last, true)
end
and then you can access from SimpleOrder
as column.nulls_last
@ajahongir I'm running into an issue in the test where I can't call column
because the datatable doesn't have the column_by
method. Can you help me understand why that isn't available? It seems to be only a testing issue.
where is your test falling?
It's failing in the simple_order_spec. But it traces back to simple_order.rb where I'm calling column.nulls_last
https://github.com/jbox-web/ajax-datatables-rails/pull/242/files#diff-4f1e2d7f5a934d960a24dbd4ab6929e4R25. column
blows up because it can't return a value because the column_by
method doesn't exist for the @datatable
.
So, I got things worked out. But the build is failing on the Oracle tests. I don't think it is related to my changes. What do I need to do to get them passing?
Also, does this need readme documentation? I'm happy to add that to this PR if you want it.
Any ideas on how to get the Oracle tests passing?
What can I do to get this Oracle test passing?
@natebird the Oracle tests now pass, can you please rebase?
Yep. I’ll do it later tonight. Thanks!
be careful there's a lot of changes :/
Closing in favor of the cleaner, #279 PR. I couldn't do a clean rebase so I just recreated the branch. :-)
config.nulls_last = true
in theajax_datatables_rails.rb
file.nulls_last: true
to the view_columns method in the datatable class.