Created
November 12, 2009 22:18
-
-
Save merbjedi/233360 to your computer and use it in GitHub Desktop.
proposed dsl customizations of merb-admin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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