app/models/concerns/twitter_user/utils.rb
# #diff calls this method in context of new record
diff calls this method in context of new record
diff calls this method in context of new record
def friend_uids
    if new_record?
      @friend_uids
    else
      if instance_variable_defined?(:@persisted_friend_uids)
        @persisted_friend_uids
      else
        @persisted_friend_uids = Efs::TwitterUser.find_by(id)&.fetch(:friend_uids, nil)
        @persisted_friend_uids = S3::Friendship.find_by(twitter_user_id: id)&.fetch(:friend_uids, nil) if @persisted_friend_uids.nil?
        @persisted_friend_uids = [] if @persisted_friend_uids.nil?
        @persisted_friend_uids
      end
    end
  end
def friend_uids if new_record? @friend_uids else if instance_variable_defined? ( :@persisted_friend_uids ) @persisted_friend_uids else @persisted_friend_uids = Efs :: TwitterUser . find_by ( id ) &. fetch ( :friend_uids , nil ) @persisted_friend_uids = S3 :: Friendship . find_by ( twitter_user_id : id ) &. fetch ( :friend_uids , nil ) if @persisted_friend_uids . nil? @persisted_friend_uids = [ ] if @persisted_friend_uids . nil? @persisted_friend_uids end end end
diff calls this method in context of new record
diff calls this method in context of new record