Created by: gracewashere
Closes #129 (closed)
Problem:
Administrate relies on #to_s
to display resources throughout the system.
In order to get Administrate working correctly,
developers must define #to_s
on all models
that will be displayed in the admin dashboard.
This process is not documented, can be confusing, and gets in the way of a zero-configuration dashboard.
Solution:
Add Administrate::BaseDashboard#display_resource
,
which takes a resource and returns a sensible string representation.
Devs can overwrite this method on a per-dashboard basis
to customize how their resources are displayed.
In order to document this method, we generate comments in each dashboard class that follow the format:
# Overwrite this method to customize how line items are displayed
# across all pages of the admin dashboard.
#
# def display_resource(line_item)
# "LineItem ##{line_item.id}"
# end
TODO
-
Add comments to generated dashboards -
CHANGELOG