Code refactoring and Cancan