I have list of user profiles. I need to sort the user profile based on following criteria as shown below:
profile_claimed(boolean) -> profile_complete_status(integer) -> No_of_friends(integer)
code:
user_profiles.sort { |x| [x.claim ? 0 : 1, x.complete_profile_status, x.no_of_friends] }
How to sort the user profile?