Skip to content

Latest commit

History

9 Commits

Folders and files

NameName
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

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages