reduce double code in devise_generator.rb