Skip to content

Instantly share code, notes, and snippets.

@sferik
Forked from merbjedi/config.rb
Created November 20, 2009 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sferik/239188 to your computer and use it in GitHub Desktop.
Save sferik/239188 to your computer and use it in GitHub Desktop.
MerbAdmin DSL
MerbAdmin.config User do
label "Users" # @model.pretty_name
list do
before do
puts "Called before list"
end
fields :name, :description # All columns
filters :publication_date, :retired # All booleans
end
search_fields :name, :description # All string type columns
edit_fields :name, :description # All
new_fields :name, :description # All
raw_id_fields :name, :description # None
order :publication_date, :reverse => true # id
excluded_actions :delete, :list # None
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment