Skip to content

Instantly share code, notes, and snippets.

@merbjedi
Created November 12, 2009 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save merbjedi/233360 to your computer and use it in GitHub Desktop.
Save merbjedi/233360 to your computer and use it in GitHub Desktop.
proposed dsl customizations of merb-admin
# configure via dsl
user_admin = MerbAdmin::ModelConfig.configure(User) do
display_name "Users"
search_fields "name", "description"
radio_field :name, :style => :vertical
after :update do
puts "Called after saving the model"
end
end
# more config
user_admin.before :create do
puts "Called before creation of the model"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment