Rails 4 + Devise + Rails API: undefined method 'flash'
问题 I have an existing Rails 4 application which uses Devise and Omniauth . I'm trying to modifying my existing app to develop an API (I mean I will have my web app as it is and also I want an API for mobile app) but I'm having a hard luck. I'm following the steps that are listed in Rails-API under "For already existing apps" section and now I'm getting the below error undefined method `flash' for #<Devise::SessionsController:0x000000098221d0> The error pops at this line <% unless flash.blank? %>