Sorry, but I no longer work on ActiveAdmin often enough to justify mantaining this gem. Take it as it is. If you are interested to update and maintain the gem, please let me know! ❤️
Extra candies for your ActiveAdmin apps.
Add activeadmin-extra
to your Gemfile:
gem 'activeadmin-extra', github: 'stefanoverna/activeadmin-extra'
Replace active_admin stylesheets and javascripts with:
@import "active_admin/extra/base"
#= require active_admin/extra
Spice up your admin forms with these brand new inputs:
String field with a larger font.
ActiveAdmin.register Page do
form do |f|
f.input :name, :as => :title
end
end
The infamous jquery combobox. To use add to your Gemfile:
gem 'chosen-rails', group: :assets
and then in your assets:
#= require chosen-jquery
@import "chosen"
Usage:
ActiveAdmin.register Product do
form do |f|
f.input :material, as: :chosen, create_option: true
end
end
For the create_option alternative use koenpunt's fork.
Number with unit of measure symbol
ActiveAdmin.register Product do
form do |f|
f.input :price, :as => :measure, :symbol => '€'
end
end
A row of numeric inputs side by side. Basic usage:
ActiveAdmin.register Box do
form do |f|
f.input :height, :as => :numbers_set # default displays a height_min and a height_max field
end
end
Multiple options:
ActiveAdmin.register Box do
form do |f|
f.input :height, :as => :numbers_set, :numbers_set => [:mm, :in, :ft]
end
end
Copyright (c) 2012 Stefano Verna, Cantiere Creativo See the file LICENSE.txt for details.