<commit_before>class List < ActiveRecord::Base
  belongs_to :user
  has_many :items, dependent: :destroy
  has_many :user_list_permissions, dependent: :destroy

  validates :user_id, presence: true
  validates :name, presence: true, length: { maximum: 200 }

  default_scope -> { order('lists.updated_at DESC') }

  def feed
    Item.where(list_id: id)
  end

  def self.search(search)
    if search
      where('lower(name) like lower(?)', "%#{search}%")
    else
      all
    end
  end
end<commit_msg>Update List#feed to use regular AR association<commit_after>class List < ActiveRecord::Base
  belongs_to :user
  has_many :items, dependent: :destroy
  has_many :user_list_permissions, dependent: :destroy

  validates :user_id, presence: true
  validates :name, presence: true, length: { maximum: 200 }

  default_scope -> { order('lists.updated_at DESC') }

  def feed
    items
  end

  def self.search(search)
    if search
      where('lower(name) like lower(?)', "%#{search}%")
    else
      all
    end
  end
end
{'fraction_non_alphanumeric': 0.11241446725317693, 'fraction_numerical': 0.005865102639296188, 'mean_word_length': 3.71889400921659, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '463873', 'n_tokens_mistral': 342, 'n_tokens_neox': 329, 'n_words': 94}