Generate the check function for an action, and use it to create a
scene_action
object.
Arguments
- fn
A function that takes a request (and potentially other arguments) and returns
TRUE
orFALSE
.- ...
Additional parameters passed on to
fn
.- negate
If
TRUE
, trigger the corresponding scene when this action isnot
matched.- methods
The http methods which needs to be accepted in order for this function to make sense. Default "GET" should work in almost all cases.
Value
A scene_action
.