class <%= class_name %>Resource < Madmin::Resource
# Attributes
<% attributes.each do |attribute_name| -%>
attribute :<%= attribute_name %><%= formatted_options_for_attribute(attribute_name) %>
<% end -%>
# Associations
<% associations.each do |association_name| -%>
attribute :<%= association_name %>
<% end -%>
# Uncomment this to customize the display name of records in the admin area. # def self.display_name(record) # record.name # end # Uncomment this to customize the default sort column and direction. # def self.default_sort_column # "created_at" # end # # def self.default_sort_direction # "desc" # end
end