I’m using rails 3 and Devise and i’m trying to restrict some actions to ed in users. REST calls in my application are done using JSON.
When i have to be logged in, Device returns this:
{
"email": "",
"password": ""
}
How can i change this message to contain a custom JSON message ?
NOTE: i’m protecting my controllers using: before_filter authenticate_user!
Answer here: https://github.com/plataformatec/devise/issues/1361