Created
May 14, 2015 09:17
-
-
Save jamiecook/f831add0dbe5d5a54982 to your computer and use it in GitHub Desktop.
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
changes = {# Authorised Kahuna Data Kahuna_valid Archived | |
Selection.status_pending => [SiteAuthorisation::ALTERED, true, false, false], | |
Selection.status_null_no_data_ => [SiteAuthorisation::AUTHORISED, false, false, false], | |
Selection.status_reject_new_ => [SiteAuthorisation::REJECTED, false, false, false], | |
Selection.status_reject_change_ => [SiteAuthorisation::REJECTED, true, false, false], | |
Selection.status_current => [SiteAuthorisation::AUTHORISED, true, true, false], | |
Selection.status_archived_has_data_ => [SiteAuthorisation::AUTHORISED, true, true, true], | |
Selection.status_archived_no_data_ => [SiteAuthorisation::ALTERED, false, false, true], | |
Selection.status_new => [SiteAuthorisation::ALTERED, false, false, false], | |
Selection.status_altered => [SiteAuthorisation::ALTERED, false, false, false], | |
} | |
counts = changes.inject({}){ |h,(old_status,states)| | |
h[old_status] = Site.where(:status_id => old_status.id).count | |
} | |
puts counts |
Is it giving in all the sites from the status_id using selections..So we could still look to modify the rake task?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got, NoMethodError: undefined method `[]=' for 11981:Fixnum