railsadminteam / rails_admin

RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data
MIT License
7.88k stars 2.25k forks source link

[Question] Custom action, custom options #2574

Closed nicovak closed 8 years ago

nicovak commented 8 years ago

Hello,

I'm wondering if It's possible to give custom option to a custom action, example,

RailsAdminConfig model

sortable do
    label_method 'code'
    position_method 'row_order'
end

Custom Action

register_instance_option :label_method do
      nil
end

register_instance_option  :position_method do
      nil
end

I tried to create a section but I just don't know how to give these supplementary parameters...

Thanks ;)

nicovak commented 8 years ago

Ok, I finally did it.

You can see the code here https://github.com/rollincode/rails_admin_sortable