zweitag/glow — pull request #8 by phil-monroe (2013-04-20 22:49:40+00:00)
Title: Add ability to set request format to headerize the flash for APIs 

You can now use glow with APIs by using `headerize_flash_for` and passing
in the request formats you want the flash messages passed back.

``` ruby
class API::Base < ActionController::Base
headerize_flash_for :json
end
```

Controllers inheriting from a controller using `headerize_format_for` will
inherit the capability or it can be overridden.

``` ruby
class API::JSON < API::Base
# will headerize flash for JSON requests
end

class API::XML < API::Base
headerize_flash_for :xml
# will NOT headerize flash for JSON requests
# but will headerize flash for XML requests
end
```