Moving changes to Rails4. Fix for update profile