-
Notifications
You must be signed in to change notification settings - Fork 0
A simple and unobtrusive way to intercept your flash calls in controllers and add before callbacks
License
lshemesh/flash_interceptor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
FlashInterceptor =========== This used to be a plugin for logging flash now its a more general purpose and simpler way to register callbacks with the use of flash it does this by overriding the ActionController flash method and returning a Flash like object that delegates back to the original flash object. It will send the callbacks to the controller when accessing the flash []= method passing along the flash message NOTE: This code is not ready for production Example ======= [ usage ] call before_flash in whatever controller you'd like to register callbacks for. Alternatively you can place it in application_controller if you want callbacks registered for all controllers Class ApplicationController < ActionController::Base before_flash :some_callback end Copyright (c) 2011 [Leo Shemesh], released under the MIT license
About
A simple and unobtrusive way to intercept your flash calls in controllers and add before callbacks
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published