Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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