Fix various columns to be either `character varying` or `text`, depending on what kind of text is stored in the column. `text` is used for columns that contain free-form natural language, like pool and forum topic titles, while `character varying` is used for short strings that don't contain free-form text, like URLs and status fields. Both types are treated the same by Postgres; the only difference is how we treat them in Rails. In edit forms, `text` fields use multi-line textboxes, while `character varying` fields use single-line inputs. And during search, we allow `text` fields to be searched using full-text search, but not `character varying` fields.
24 lines
766 B
Plaintext
24 lines
766 B
Plaintext
<div id="form-content">
|
|
<%= edit_form_for(forum_topic) do |f| %>
|
|
<%= f.input :title, as: :string %>
|
|
|
|
<div class="input">
|
|
<label for="forum_topic_category_id">Category</label>
|
|
<%= forum_topic_category_select("forum_topic", "category_id") %>
|
|
</div>
|
|
|
|
<%= f.simple_fields_for :original_post do |pf| %>
|
|
<%= pf.input :body, as: :dtext %>
|
|
<% end %>
|
|
|
|
<% if policy(forum_topic).moderate? %>
|
|
<%= f.input :min_level, :include_blank => false, :collection => available_min_user_levels %>
|
|
<%= f.input :is_sticky, :label => "Sticky" %>
|
|
<%= f.input :is_locked, :label => "Locked" %>
|
|
<% end %>
|
|
|
|
<%= f.button :submit, "Submit" %>
|
|
<%= dtext_preview_button "forum_topic_original_post_body" %>
|
|
<% end %>
|
|
</div>
|