title: cancancan custom action not working
body: <p>Am using cancancan and activeadmin gems in my application, in cancan gem the custom action is not working. </p>
  
  <p>ability.rb</p>
  
  <pre><code> if ((user.has_role? :HRMS_Supervisor) &amp;&amp; (user.has_application? :HRMS))
         can :manage, User
         can :approve, User  // custom action
      end
  
      if ((user.has_role? :HRMS_Employee) &amp;&amp; (user.has_application? :HRMS))
        can :read,   Employee
        can :manage, User
        can :employee_access, User // custom action
      end
  </code></pre>
  
  <p>my activeadmin file</p>
  
  <pre><code>ActiveAdmin.register Teleworker do
    scope :pending,  default: true
    scope :approved
    scope :rejected, if: proc{ can? :employee_access, current_user }
    scope :all
  
   index  do
    selectable_column
    column "Action" do |resource|
      links = ''.html_safe
      if can? :approve, current_user
       links += link_to "approve", resource_path(resource), class: "member_link view_link"
      end
    end
  end
  </code></pre>
  
  <p>the rejected  scope and link_to "approve" is displaying for both the roles. how to solve this.</p>