Loop through fields using ruby resource?