zorab47 / active_admin-sortable_tree

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

before sort and after sort callbacks #27

Closed ghost closed 9 years ago

ghost commented 10 years ago

have a good day! so, i'd found that sometimes it's really required to pass callbacks before sorting and after sorting callbacks or fully override sort logic (for example if i want to sort nested sets or i want to set up lock / unlock before and after sort). is there any ideas how can i do it? may be, add possibility to pass callback function instead of default implementation in collection_action :sort, :method => :post ?

nebirhos commented 10 years ago

Hi @ghost! Actually the only way to customize the sort action is to redefine it in your admin.rb. If you can provide me an example maybe I could help.