<commit_before># frozen_string_literal: true

module Folio
  class Menu < ApplicationRecord
    # Relations
    has_many :menu_items, -> { order(:position) }, dependent: :destroy
    accepts_nested_attributes_for :menu_items, allow_destroy: true,
                                               reject_if: :all_blank
<commit_msg>Menu use named default scope for menu items<commit_after># frozen_string_literal: true

module Folio
  class Menu < ApplicationRecord
    # Relations
    has_many :menu_items, -> { ordered }, dependent: :destroy
    accepts_nested_attributes_for :menu_items, allow_destroy: true,
                                               reject_if: :all_blank

{'fraction_non_alphanumeric': 0.06942392909896603, 'fraction_numerical': 0.0, 'mean_word_length': 2.6847826086956523, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '204266', 'n_tokens_mistral': 173, 'n_tokens_neox': 172, 'n_words': 47}