newton10471
newton10471

Reputation: 167

change text of active admin has_many_remove button?

How do I change the text on the Remove (the one assigned class 'has_many_remove') button on an active admin f.has_many stanza from 'Remove' to 'Hide'? Only for the current page/model and not site-wide.

Upvotes: 0

Views: 519

Answers (2)

newton10471
newton10471

Reputation: 167

I confirmed this feature is missing from Active Admin, see the discussion in the issues section of the Active Admin github repo: https://github.com/activeadmin/activeadmin/issues/5283

Upvotes: 1

Wasif Hossain
Wasif Hossain

Reputation: 3940

For application-wide change, you just need to add the following inside config/locales/en.yml:

en:
  active_admin:
    has_many_remove: "Hide"

But for page-specific change, you need some help from JS.

p.s. I can update the answer with js solution if you can provide your specific needs.

Upvotes: 0

Related Questions