O'Reilly logo
  • Shinji Abe thinks this is interesting:

config/initializers/devise.rb and modify the code:

config.authentication_keys = [:username]
config.case_insensitive_keys = [:username]
config.strip_whitespace_keys = [:username]

From

Cover of Learning Devise for Rails

Note

deviceでユーザー名でログインできるようにする設定