title: How to make use of "username or Email", to login in devise?
body: <p>I found a way to customize devise to use  username to login instead of email address.<br>
  But actually I want to use combination :-  </p>
  
  <pre><code>Enter username or Email:   &lt;text-box&gt;
  Enter your password    :   &lt;text-box&gt;  
  </code></pre>
  
  <p>So how to achieve this ?  </p>
  
  <p>Actually we need to modify devise gem's configuration to support this.<br>
  for now I know that modifying the "/config/initializers/devise.rb"  file as </p>
  
  <pre><code>config.authentication_keys = [ :username ] (edited from email to username.)  
  </code></pre>
  
  <p>would actually enable logging in using username instead of emailid.<br>
  But can I do some thing like:-  </p>
  
  <pre><code>config.authentication_keys = [ :username | :email] in the "config/initializers/devise.rb" file.  
  </code></pre>
  
  <p>So that we devise can take username or email as authentication key at runtime depending on the input provided by user.<br>
  Thanks in advance .</p>