Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
fixed_activeadmin_sortable_table
Advanced tools
This gem extends ActiveAdmin so that your index page's table rows can be orderable via a drag-and-drop interface.
This extension assumes that you're using acts_as_list on any model you want to be sortable.
class Page < ActiveRecord::Base
acts_as_list
end
Add it to your Gemfile
gem "activeadmin_sortable_table"
Include the JavaScript in active_admin.js.coffee
#= require activeadmin_sortable_table
Include the Stylesheet in active_admin.css.scss
@import "activeadmin_sortable_table"
ActiveAdmin.register Page do
include ActiveAdmin::SortableTable # creates the controller action which handles the sorting
config.sort_order = 'position_asc' # assumes you are using 'position' for your acts_as_list column
index do
handle_column
end
show do |c|
attributes_table do
row :id
row :name
end
panel 'Contents' do
table_for c.collection_memberships do
handle_column
column :position
column :collectable
end
end
end
end
You can override handler column symbol using handle_column options:
You can configure sort_url
using handle column options by providing static value, symbolized instance method name, or blocks.
handle_column sort_url: ->(category) { compute_url_for_category(category) }
handle_column sort_url: '/admin/categories/1/sort'
handle_column sort_url: :sort_category
The same options available for move_to_top_url
:
handle_column move_to_top_url: '/admin/categories/1/move_to_top
It's also possible to override handle lables:
handle_column sort_handle: '☰'.html_safe
handle_column move_to_top_handle: 'Move to top'
git checkout -b my-new-feature
)bundle exec rake dummy:prepare
)bundle exec rspec
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that fixed_activeadmin_sortable_table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.