Created
May 10, 2013 01:55
-
-
Save nigelr/5551916 to your computer and use it in GitHub Desktop.
special_report
This file contains hidden or 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.report | |
| from_date = '20130401' | |
| entities = Entity.unscoped.where('updated_at > ?', from_date).where('type in (?)', ['Contact', 'Deceased', 'Child']).where(culture_id: [Selection.culture_australian_aboriginal.id, Selection.culture_australian.id]).order(:site_id, :type) | |
| p entities.length | |
| media_items = MediaItem.unscoped.where('updated_at > ?', from_date) | |
| p media_items.length | |
| entities = Entity.unscoped.where('updated_at > ?', from_date).where('type in (?)', ['Contact', 'Deceased', 'Child']).where(referral_source_id: [Selection.referral_source_internet.id, Selection.referral_source_information_session.id]).order(:site_id, :type) | |
| p entities.length | |
| entities = Entity.unscoped.where('updated_at > ?', from_date).where('type in (?)', ['Contact', 'Deceased', 'Child']).where(relation_id: [Selection.relation_friend.id, Selection.relation_support_1.id]).order(:site_id, :type) | |
| p entities.length | |
| end |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
results
156
11
0
1