docs/8-custom-actions.md in activeadmin-1.0.0 vs docs/8-custom-actions.md in activeadmin-1.1.0
- old
+ new
@@ -1,8 +1,9 @@
---
redirect_from: /docs/8-custom-actions.html
---
+
# Custom Controller Actions
Active Admin allows you to override and modify the underlying controller which
is generated for you. There are helpers to add collection and member actions, or
you can drop right in to the controller and modify its behavior.
@@ -136,10 +137,12 @@
```
Actions items also accept the `:if` option to conditionally display them:
```ruby
-action_item :super_action, only: :show, if: proc{ current_admin_user.super_admin? } do
+action_item :super_action,
+ only: :show,
+ if: proc{ current_admin_user.super_admin? } do
"Only display this to super admins on the show screen"
end
```
# Modifying the Controller