administrate
administrate copied to clipboard
valid_action? where edit is excluded doesn't remove edit link on show page where index appears
- What were you trying to do? Suppress editing functionality on a model
- What did you end up with (logs, or, even better, example apps are great!)?
The edit button on the show page of model was in fact suppressed, but, on a show page of a different object where that model was present in a HasMany relationship, the edit link remained in the index. This did not seem to be the case for destroy, interestingly enough, where
valid_action?removed the link in both situations. - What versions are you running?
- Rails 5.1.7
- administrate 0.14.0
Related: https://github.com/thoughtbot/administrate/issues/1861 Both issues might be solved if we unified valid_action? and show_action?.
Ongoing work to fix this issue properly: https://github.com/thoughtbot/administrate/pull/1941
Should be fixed by #1941