Is there any logic to update ActiveRecord Query Record's field from 1 to n.
@user = User.where(country: 'US')
Need to update above @user's field count from 1 to n.
Thanks in Advance.
EDIT:
Need to update all record's - field is count
.
AR Query will return array, need to each element in array(tuple)'s count
field from 1 to n
Example: AR Query Output: [User1, User2, User3, User4, ...]
User1's count
field must be updated to 1
User2's count
field must be updated to 2
and so on.