
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Enhanced sub-navigation for nested ActiveAdmin resources.
Currently, the base ActiveAdmin resets the top navigation menu to display the nested navigation menu, but it can be confusing to lose the main navigation context. This project keeps the main navigation visible and displays a secondary navigation bar for nested resources.
Supports both ActiveAdmin v1.0.0+ and older v0.6.4+ versions.
Note: Optional belongs_to configurations are not supported!
Resource belongs_to
configuration does not require any extra configuration
beyond the default. Below the Post resource belongs to Site.
# admin/site.rb
ActiveAdmin.register Site
# admin/post.rb
ActiveAdmin.register Post do
belongs_to :site
end
Registering belongs_to
pages requires more setup to properly access the
parent record. This is a side effect of how Arbre references parent
HTML nodes. Below a new method, #site
, is created to provide access to the
parent record.
# admin/site_statistics.rb
ActiveAdmin.register_page "Statistics" do
belongs_to :site
content do
statistics = site.statistics
# ...
end
controller do
# Provide access to the parent resource record: Site.
#
# Without this extra setup the parent record will not be accessible. Any
# calls to `#parent` will return the Arbre parent element and not the
# ActiveAdmin resource.
alias_method :site, :parent
# Expose the method as a helper making it available to the view
helper_method :site
end
end
Add this line to your application's Gemfile:
gem 'active_admin-subnav'
And then execute:
$ bundle
Add the subnav's styles to your active_admin.css.scss
stylesheet:
//= require active_admin/subnav
// Align subnav with main navigation by padding the width of the site's
// title.
#header div.subnav {
padding-left: 8.333em;
}
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Follows Semantic Versioning 2.0.0
FAQs
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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.