5

When editing a form with Thoughtbot's Administrate gem, the dropdown options for a select field or HasMany relationship always display all possible records for a given Model/Association.

However I would only like to display records that are relevant to the current user, and preferably without hacking the Administrate controllers or views.

Pundit scopes using 'resolve admin' only seem to affect index pages, not forms.

Has anyone come across or resolved this issue elegantly?

Branksy
  • 101
  • 6
  • > However I would only like to display records that are relevant to the current user. Could you clarify how, in your application, the has_many select options are or are not relevant to current_user when you are viewing a form? – Ecnalyr Oct 06 '20 at 20:11

0 Answers0