Skip to content

Instantly share code, notes, and snippets.

@JohnGoodman
Created February 23, 2012 19:26
Show Gist options
  • Save JohnGoodman/1894506 to your computer and use it in GitHub Desktop.
Save JohnGoodman/1894506 to your computer and use it in GitHub Desktop.
Example rails_admin.rb file
RailsAdmin.config do |config|
# Define the actions so we can add duplicate program
config.actions do
# root actions
dashboard # mandatory
# collection actions
index # mandatory
new
export
history_index
bulk_delete
# member actions
show
edit
delete
history_show
show_in_app
duplicate_program # This is my custom action
end
config.model Program do
# This never worked for me
# config.actions do
# member :duplicate_program do
# visible true
# end
# end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment