Skip to content

Instantly share code, notes, and snippets.

@beck03076
Created July 16, 2014 20:15
Show Gist options
  • Save beck03076/c6f8825080657c6c7afd to your computer and use it in GitHub Desktop.
Save beck03076/c6f8825080657c6c7afd to your computer and use it in GitHub Desktop.
class AuditorObserver < ActiveRecord::Observer
observe :enquiry,:note,:follow_up,:programme,
:registration,:email,:application_status,
:contact_type,:course_level,:course_subject,:doc_category,
:english_level,:enquiry_status,:event_type,:exam_type,
:qualification,:student_source,
:todo_topic,:institution_type,:institution_group,
:contract,:contract_doc_category,:person_type,
:person,:commission_status,:branch,
:smtp,:email_template,:allow_ip,
:commission_claim_status,:progression_status,
:processing_fee_type,:processing_fee_status,
:document,:role
def before_create(record)
record.created_by = User.current.id
end
def before_update(record)
record.updated_by = User.current.id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment