title: Can't manage models from rails_admin with CanCan
body: <p>I have an User model and an Admin model. I use CanCan and Devise for both. I use rails_admin but when I want to list or edit users from my rails_admin I got a mysterious error.</p>
  
  <pre><code>Processing by RailsAdmin::MainController#index as HTML
  Parameters: {"model_name"=&gt;"user"}
  Admin Load (0.4ms)  SELECT `admins`.* FROM `admins` WHERE `admins`.`id` = 1 ORDER BY `admins`.`id` ASC LIMIT 1
  Completed 500 Internal Server Error in 9ms
  
  NameError (uninitialized constant User::Permission):
  </code></pre>
  
  <p>I think User::Permission is from CanCan but I'm not sure.</p>
  
  <p>I got almost the same error when I try to edit many others models that belong to a user. But the error change :</p>
  
  <pre><code>ActionView::Template::Error (uninitialized constant User::Permission):
  </code></pre>
  
  <p><strong>My Ability model</strong></p>
  
  <pre><code>class Ability
      include CanCan::Ability
  
      def initialize(resource)
  
          # Define guest user role
          if !resource
              resource = User.new
              resource.role = "guest"
          end
  
          # Authorizations for admins
          if resource.class == Admin 
              can :dashboard
              can :access, :rails_admin
              can :manage, User # I delete all models for the topic
              can :manage, Piggybak.config.manage_classes.map(&amp;:constantize)
              Piggybak.config.extra_abilities.each do |extra_ability|
                  can extra_ability[:abilities], extra_ability[:class_name].constantize
              end
          end
  
          # Authorizations for users
          if resource.class == User
              case resource.role
                  # Guest
                  when "guest"
                      can :create, User
                  # Freemium
                  when "member"
                      can :manage, User
  
              end
          end
      end
  end
  </code></pre>