hey guys,
i am writing a couple of actions which are only used with an xhr. I
‘protect’ them all against a direct access with the ‘verify’ method in
the controller
verify :only => …, :xhr => true
it would be cool if the system would automatically recognize the xhr
actions and protect them … i want to postfix methods with ‘_xhr’ and
those should be only accessible with an xhr.
- good for readability
- good for my DRY
does anyone has a tip on how to implement this? i guess it should go
into the ‘ApplicationController’