After looking through the logs and the source code, I found that the .to_i method was being used to get the id of the sortable model. This would therefore not allow for the sorting of models that uses anything but integer values as ids.
def find_model(klass_to_id)
klass, id = klass_to_id.values_at('klass', 'id')
klass.constantize.find(id.to_i)
end
If this assessment is correct, I'd be happy to make a PR to try and fix it over the next week or two. Otherwise, please excuse me for bringing up a mute point. I'd love to hear what I'm getting wrong.
After looking through the logs and the source code, I found that the .to_i method was being used to get the id of the sortable model. This would therefore not allow for the sorting of models that uses anything but integer values as ids.
method found here: https://github.com/itmammoth/rails_sortable/blob/master/app/controllers/sortable_controller.rb#L21
If this assessment is correct, I'd be happy to make a PR to try and fix it over the next week or two. Otherwise, please excuse me for bringing up a mute point. I'd love to hear what I'm getting wrong.