<commit_before>module Para
  module Page
    module Model
      extend ActiveSupport::Concern

      included do
        has_many :sections, -> { ordered }, class_name: '::Para::Page::Section',
                                            as: :page,
                                            dependent: :destroy
        accepts_nested_attributes_for :sections, allow_destroy: true
      end
    end
  end
end
<commit_msg>ensure page model assigns sections page attribute when built from nested form<commit_after>module Para
  module Page
    module Model
      extend ActiveSupport::Concern

      included do
        has_many :sections, -> { ordered }, class_name: '::Para::Page::Section',
                                            as: :page,
                                            dependent: :destroy,
                                            inverse_of: :page
        accepts_nested_attributes_for :sections, allow_destroy: true
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.06488156539649846, 'fraction_numerical': 0.0, 'mean_word_length': 1.4923076923076923, 'pattern_counts': {'":': 0, '<': 3, '<?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': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3269831', 'n_tokens_mistral': 215, 'n_tokens_neox': 209, 'n_words': 67}