<commit_before>- unless params[:header] == '0'
  .page-header
    %h1= @design.name

- unless @design.description.blank?
  .bs-callout.bs-callout-info
    = simple_markdown @design.description


- variables = @project.variables.where(id: @sheet.design.options.collect{ |option| option[:variable_id] }).to_a
- sheet_variables = @sheet.sheet_variables.to_a

- @design.options.each do |option|
  - @option = option
  - if @option[:variable_id].blank?
    = render 'sheet_variables/section'
  - elsif variable = variables.select{ |v| v.id == @option[:variable_id].to_i }.first<commit_msg>Surveys now correctly preload variables and sheet_variables<commit_after>- unless params[:header] == '0'
  .page-header
    %h1= @design.name

- unless @design.description.blank?
  .bs-callout.bs-callout-info
    = simple_markdown @design.description


- variables = @project.variables.where(id: @design.options.collect{ |option| option[:variable_id] }).to_a
- sheet_variables = @sheet ? @sheet.sheet_variables.to_a : []

- @design.options.each do |option|
  - @option = option
  - if @option[:variable_id].blank?
    = render 'sheet_variables/section'
  - elsif variable = variables.select{ |v| v.id == @option[:variable_id].to_i }.first
{'fraction_non_alphanumeric': 0.15220949263502456, 'fraction_numerical': 0.0032733224222585926, 'mean_word_length': 4.271551724137931, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1784199', 'n_tokens_mistral': 411, 'n_tokens_neox': 406, 'n_words': 78}