Skip to content

Instantly share code, notes, and snippets.

@ajsharp
Created October 27, 2009 01:58
Show Gist options
  • Save ajsharp/219237 to your computer and use it in GitHub Desktop.
Save ajsharp/219237 to your computer and use it in GitHub Desktop.
# the restrict_access_to method would operate essentially identical to
# a before_filter, I just like how it reads a little better than a before filter
class PatientsController < ApplicationController
restrict_access_to [:therapists, :accountants, :practice_admins], :on => :all
before_filter :check_patient_signoff
end
class BillingController < ApplicationController
restrict_access_to [:receptionists, :accountants], :on => [:show, :index]
restrict_access_to [:therapists, :pt_assistants], :on => [:create, :edit, :destroy, :new, :update]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment