-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Base action
bbenezech edited this page Sep 10, 2012
·
5 revisions
All actions inherit from this one.
Restrict action to one/more specified model(s):
actions do
index do
only Player # no other model will have the `index` action visible.
end
new do
only [Player, Comment] # no other model will have the `new` action visible. Note the extra brackets '[]' when there is more than one model.
end
end
Relevant only for model/instance actions, not base actions (like dashboard
).
Restrict action from one/more specified model(s):
actions do
index do
except Player # all other models will have the `index` action visible.
end
new do
except [Player, Comment] # all other models will have the `new` action visible. Note the extra brackets '[]' when there is more than one model.
end
end
Relevant only for model/instance actions, not base actions (like dashboard
).