<commit_before><%
# SUMMARY: Displays a control for assigning a room to a proposal.
#
# Variables:
# * proposal: Proposal object to create a room selector for, required.
# * form: Form to include this selector in, optional.

form ||= nil
proposal ||= @proposal
args = [:collection_select, :room_id, proposal.event.rooms, :id, :name, {:include_blank => '- None -'}]
%>

<% if form %>
  <%= form.send(*args) %>
<% else %>
  <% form_for proposal do |f| %>
    <%= f.send(*args) %>
  <% end %>
<% end %><commit_msg>Fixed proposals#_room_control when creating a new proposal as admin and the proposal has no event assigned to it yet.<commit_after><%
# SUMMARY: Displays a control for assigning a room to a proposal.
#
# Variables:
# * proposal: Proposal object to create a room selector for, required.
# * form: Form to include this selector in, optional.

form ||= nil
proposal ||= @proposal
args = proposal.event ? [:collection_select, :room_id, proposal.event.rooms, :id, :name, {:include_blank => '- None -'}] : nil
%>

<% if args %>
  <% if form %>
    <%= form.send(*args) %>
  <% else %>
    <% form_for proposal do |f| %>
      <%= f.send(*args) %>
    <% end %>
  <% end %>
<% end %>
{'fraction_non_alphanumeric': 0.16764953664700927, 'fraction_numerical': 0.0, 'mean_word_length': 3.752, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 23, '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': '4217581', 'n_tokens_mistral': 423, 'n_tokens_neox': 377, 'n_words': 131}