Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.