title: Is it possible to use cancan with two ability class
body: <p>I'm using rails 3.0.9, cancan 1.6.7 and devise 1.4.8 </p>
  
  <p>I'm using two devise models(User and Admin) for different log-in and registration process</p>
  
  <p>So I want to divide the abilities depend upon the logged-in user(resource), because there are more than
  70 models and only 10 models are common for both type of users(here more than 50 models and views are only used by Admin users)</p>
  
  <p>I want to implement two Ability class(UserAbility and AdminAbility) and the devise helper method current_user/current_admin should be passed to UserAbility/AdminAbility</p>
  
  <p>Example:</p>
  
  <p>In ApplicationController.rb file</p>
  
  <pre><code>    def current_ability
          if current_user
              @current_ability = UserAbility.new(current_user)
          elsif current_admin
              @current_ability = AdminAbility.new(current_admin)
          end
      end
  </code></pre>
  
  <p>From the above my questions,</p>
  
  <ol>
  <li><p>Is multiple ability class is possible in cancan, if possible then how to create it because I tried </p>
  
  <p><code>rails g cancan:user_ability</code></p>
  
  <p>but I got error as <strong>Could not find generator cancan:user_ability</strong>.</p></li>
  <li><p>How to choose the appropriate Ability class for the logged-in User/Admin.</p></li>
  <li><p>If a controller is accessed by both the User and Admin, then how can I get the currently logged-in User/Admin's object</p></li>
  </ol>
  
  <p>Is there any other solution for this?</p>
  
  <p>Any one please help to solve this</p>