
Security News
Node.js Moves Toward Stable TypeScript Support with Amaro 1.0
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
activeadmin-async_panel
Advanced tools
This gem allows you to create ActiveAdmin panels with content loaded dynamically via AJAX requests.
Minimum Ruby version 2.7
Rails 7
This extension assumes that you're using Active Admin
Add this line to your application's Gemfile:
gem 'activeadmin-async_panel'
And then execute:
$ bundle
Or install it yourself as:
$ gem install activeadmin-async_panel
Include this line in your JavaScript code (active_admin.js)
//= require activeadmin-async_panel
Include this line in your CSS code (active_admin.scss)
@import "activeadmin-async_panel";
To use this stuff do next steps:
panel 'Name', class: 'async-panel', 'data-url' => some_action_admin_resources_path, 'data-period' => 1.minute
If you setup data-period
, panel will be periodically updated. If not, it will be loaded once right after page load
If you set data-clickable
to a truthy value, the panel will not be loaded upon initial page load. Instead, the panel will load upon clicking the panel header. Upon page load, the panel header will have a label of 'Click to Load'. Example:
panel 'Name', class: 'async-panel', 'data-url' => some_action_admin_resources_path, 'data-clickable' => 1
Define member_action
or collection_action
to handle request specified by path helper
collection_action :some_action do
@resources = Resource.some_scope
render layout: false # mandatory line, layout should be disaled to render template only
end
Define you view template to render action above in file views/admin/resources/some_action.html.arb
can also be (slim, erb), for e.g. arb
template:
table_for resources do
column :value1
column :value2
end
Note that in step 2 you can pass template variables with @
, but inside arb
template you should use them without @
, and inside erb
, slim
with.
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/holyketzer/activeadmin-async_panel. This project is intended to be a safe, welcoming space for collaboration.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that activeadmin-async_panel 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.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.