<commit_before>class PublishFormSectionController < ApplicationController

  def form_sections
    enabled_form_sections = FormSection.all_by_order.reject{|fs| !fs.enabled}
    render :inline => enabled_form_sections.to_json
  end
end<commit_msg>#161 - Modified PublishedFormSection to return json response - for Blackberry client<commit_after>class PublishFormSectionController < ApplicationController

  def form_sections
    enabled_form_sections = FormSection.all_by_order.reject{|fs| !fs.enabled}
    json_content = enabled_form_sections.to_json
    respond_to do |format|
      format.html {render :inline => json_content }
      format.json { render :json => json_content }
    end
  end
end
{'fraction_non_alphanumeric': 0.07020057306590258, 'fraction_numerical': 0.004297994269340974, 'mean_word_length': 5.025862068965517, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '2006899', 'n_tokens_mistral': 199, 'n_tokens_neox': 193, 'n_words': 45}