voomify/egregious — pull request #5 by dwbutler (2013-01-19 01:55:57+00:00)
Title: Compatibility with Rails::API

Hi,

I tried out Egregious inside a [Rails::API](https://github.com/rails-api/rails-api) controller like so:

```ruby
class ApplicationController < ActionController::API
include Egregious
...
end
```
It turns out that Rails::API does not define ```flash``` or ```respond_to```. (See https://github.com/rails-api/rails-api/issues/64). This patch will allow Egregious to work inside of a Rails::API controller by redefining the affected methods.

I also fixed the specs. Looks like they hadn't been run in a while? :)