class Admin::BaseController < ApplicationController
  inherit_resources
  before_filter do
    authorize! :access, :admin
  end

  def update
    update! do |format|
      if resource.errors.empty?
        format.json { respond_with_bip(resource) }
      else
        format.html { render action: "edit" }
        format.json { respond_with_bip(resource) }
      end
    end
  end
end

module Admin
  def self.policy_class
    AdminPolicy
  end

  class BaseController < ApplicationController
    inherit_resources

    before_filter do
      authorize Admin, :access?
    end

    def update
      update! do |format|
        if resource.errors.empty?
          format.json { respond_with_bip(resource) }
        else
          format.html { render action: 'edit' }
          format.json { respond_with_bip(resource) }
        end
      end
    end
  end
end

Use admin policy class on admin
Use admin policy class on admin
