Fixes #285 latest RoR 3.x and devise changes