I'm building rails application and I use form_for
to render the form. Everything works fine works fine except one text field has ActiveRecord_Associations_CollectionProxy
inside the text which I'm not sure where it's coming from.
Here's my form
<%= form_for(@video, html: { class: "directUpload" }, multipart: true) do |f| %>
<% if @video.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@video.errors.count, "error") %> prohibited this user from being saved:</h2>
<ul>
<% @video.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :title %><br>
<%= f.text_field :title %>
</div>
<div class="field">
<%= f.label :path %><br>
<%= f.file_field :path%>
</div>
<div class="field">
<%= f.label :tags %><br>
<%= f.text_field :tags %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
And here's my Video
model
class Video < ActiveRecord::Base
belongs_to :user
has_many :video_tags
has_many :tags, through: :video_tags
end
Here's the screenshot