zorab47 / active_admin-sortable_tree

Show ActiveAdmin index as a nested tree with drag'n'drop
MIT License
162 stars 127 forks source link

Fix for rails 4.1 #29

Closed jdurand closed 10 years ago

scarver2 commented 10 years ago

I assume you are referring to the undefined method sort_by! for #<Model::ActiveRecord_Relation:0x007ff81fd44508> If so, define the sort_by method on in your model and return the position column.

def self.sort_by!
  :position
end
jdurand commented 10 years ago

@scarver2 I don't see reimplementing deprecated AR code in my own code base as a good solution.

chipairon commented 10 years ago

Hi,

This pull request should be merged. I Complete agree with @jdurand

zorab47 commented 10 years ago

Agreed. This is a must for Rails 4.1 compatibility.

stasl commented 10 years ago

+1 Please merge

nebirhos commented 10 years ago

Thank you so much @jdurand ! Just stumbled on this error after upgrading. Maybe it's time to do a little gem maintenance...