Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # somewhat contrived example of an around-filter
- around_filter :only => ['withdraw_money', 'transfer_money'] do
- # log who is trying to move money around
- start = Time.now
- yield # do the action
- # note how long it took
- logger.info params
- logger.info (Time.now - start)
- end
Advertisement
Add Comment
Please, Sign In to add comment