Created by: DevinFrenze
Use associated_class to render belongs_to links
The class_name option that allows an associative field to render the proper class / dashboard was not previously accounted for when validating whether or not to link to a belongs_to resource in the belongs_to index and show partials.
The following actions were taken:
- Add documentation for class_name in customizing_dashboards
- Make associated_class a public method for associative fields
- Call valid_action? with associated_class in belongs_to partials
- Test that valid_action? is called with correct value
- Test that the link is rendered when action is valid
Note:
- When running
appraisal install
,gem pundit
was added several times to the gemfile - The test that is failing is the same test that is failing on master
- This PR follows up on https://github.com/thoughtbot/administrate/issues/1050