I would like to be able to create tags only, no editing, but allowing destroying. The tags are a partial on my Posts page. It works I just cant figure out how to put the result that is in a “text_field” into a label.
<%= form.fields_for :tags do |tag_form| %>
<div class="field">
<%= tag_form.text_field :tag %> #instead of this I want the result as the label for the destroy textbox.
<% unless tag_form.object.nil? || tag_form.object.new_record? %>
<%= tag_form.check_box :_destroy %>
</div>
<% else %>
CREATE NEW TAG
<% end %>
<% end %>
try this