The admin? method isn't defined for users so if you use user.admin? the app will crash. You could just probably take out the if...else...end block entirely since we're going to be changing it anyway!