administrate icon indicating copy to clipboard operation
administrate copied to clipboard

valid_action? where edit is excluded doesn't remove edit link on show page where index appears

Open caljess599 opened this issue 4 years ago • 2 comments

  • 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

caljess599 avatar Feb 13 '21 00:02 caljess599

Related: https://github.com/thoughtbot/administrate/issues/1861 Both issues might be solved if we unified valid_action? and show_action?.

pablobm avatar Mar 04 '21 13:03 pablobm

Ongoing work to fix this issue properly: https://github.com/thoughtbot/administrate/pull/1941

pablobm avatar Mar 25 '21 16:03 pablobm

Should be fixed by #1941

pablobm avatar Apr 06 '23 17:04 pablobm