Skip to content

Commit

Permalink
Merge pull request #17 from dkniffin/update-url-building
Browse files Browse the repository at this point in the history
Update the way the url is built
  • Loading branch information
dkniffin authored Mar 10, 2022
2 parents 90e79ea + 32db51a commit 9239b94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Binary file removed activeadmin_reorderable-0.1.5.gem
Binary file not shown.
7 changes: 2 additions & 5 deletions lib/active_admin/reorderable/table_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ def reorder_column
private

def reorder_handle_for(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)
aa_resource = active_admin_namespace.resource_for(resource.class)
url = aa_resource.route_member_action_path(:reorder, resource)

span(reorder_handle_content, :class => 'reorder-handle', 'data-reorder-url' => url, 'data-reorder-id' => resource.id)
end
Expand All @@ -28,4 +26,3 @@ def reorder_handle_content
::ActiveAdmin::Views::TableFor.send(:include, TableMethods)
end
end

0 comments on commit 9239b94

Please sign in to comment.