/flash_interceptor

A simple and unobtrusive way to intercept your flash calls in controllers and add before callbacks

Primary LanguageRubyMIT LicenseMIT

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