Created
July 26, 2012 15:08
-
-
Save vsizov/3182614 to your computer and use it in GitHub Desktop.
shit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.student_search(params) | |
self.search( :full_name_or_user_email_or_role_student_type_teacher_or_home_phone_number_or_mobile_phone_number_contains => params) | |
end | |
def self.parent_search params | |
self.search( :full_name_or_user_email_or_role_parent_type_employer_or_role_parent_type_work_email_or_role_parent_type_work_phone_number_or_home_phone_number_or_mobile_phone_number_contains => params) | |
end | |
def self.joined_search(params) | |
self.search( :full_name_or_user_email_or_role_student_type_teacher_or_home_phone_number_or_mobile_phone_number_or_role_parent_type_employer_or_role_parent_type_work_email_or_role_parent_type_work_phone_number_or_home_phone_number_or_mobile_phone_number_contains => params) | |
end | |
def mark_as_paid! | |
self.update_attributes(:paid => true, :paid_for_on => Time.now) | |
end | |
def mark_as_unpaid! | |
self.update_attributes(:paid => false, :paid_for_on => nil) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment