Skip to content

Commit

Permalink
Fix route in reorderable table
Browse files Browse the repository at this point in the history
Building the route the way the older ActiveAdmin versions do. Should
eventually be updated for AA 1.2
  • Loading branch information
zporter committed Mar 1, 2018
1 parent 4b766d0 commit 91314ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/active_admin/reorderable/table_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ def reorder_column
private

def reorder_handle_for(resource)
aa_resource = active_admin_namespace.resource_for(resource.class)
url = url_for [:reorder, aa_resource.route_prefix, resource]
aa_resource = active_admin_namespace.resource_for(resource.class)
instance_name = aa_resource.resources_configuration[:self][:route_instance_name]

url = send([:reorder, aa_resource.route_prefix, instance_name, :path].join('_'), resource)

span(reorder_handle_content, :class => 'reorder-handle', 'data-reorder-url' => url)
end
Expand Down

0 comments on commit 91314ec

Please sign in to comment.