<commit_before><%
object_id = params[:id].blank? ? container_id : params[:id]

@rotisserie_discussion = RotisserieDiscussion.find(object_id)
@rotisserie_posts = @rotisserie_discussion.rotisserie_posts.roots
#@rotisserie_posts = @rotisserie_discussion.rotisserie_posts.find(:all, :conditions => ['parent_id is null']) 
%>

<div class="discussion_topic">
  <div class="div_header"><%= @rotisserie_discussion.output %></div>
  <div class="discussion_content"><%= @rotisserie_discussion.description %></div>
</div>

<% @rotisserie_posts.each do |post|  %>
  <%= render :partial => 'rotisserie_posts/rotisserie_post_content', :locals => {:post => post} %>
<% end %>

<% unless @rotisserie_discussion.answered_discussion? %>
  <button id="button-post-create-<%= @rotisserie_discussion.id %>" name="button-post-create" class="ui-button ui-state-default ui-corner-all">Create post</button>
<% end %>
<commit_msg>Locking permissions on the discussions<commit_after><%
object_id = params[:id].blank? ? container_id : params[:id]

@rotisserie_discussion = RotisserieDiscussion.find(object_id)
@rotisserie_posts = @rotisserie_discussion.rotisserie_posts.roots
#@rotisserie_posts = @rotisserie_discussion.rotisserie_posts.find(:all, :conditions => ['parent_id is null']) 
%>

<div class="discussion_topic">
  <div class="div_header"><%= @rotisserie_discussion.output %></div>
  <div class="discussion_content"><%= @rotisserie_discussion.description %></div>
</div>

<% @rotisserie_posts.each do |post|  %>
  <%= render :partial => 'rotisserie_posts/rotisserie_post_content', :locals => {:post => post} %>
<% end %>

<% if  (!@rotisserie_discussion.answered_discussion? && @rotisserie_discussion.current_round == 1) || (@rotisserie_discussion.owner? || @rotisserie_discussion.admin?)%>
  <button id="button-post-create-<%= @rotisserie_discussion.id %>" name="button-post-create" class="ui-button ui-state-default ui-corner-all">Create post</button>
<% end %>

{'fraction_non_alphanumeric': 0.17223650385604114, 'fraction_numerical': 0.0005141388174807198, 'mean_word_length': 7.316239316239316, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 45, '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': '1690948', 'n_tokens_mistral': 702, 'n_tokens_neox': 642, 'n_words': 102}