diff options
Diffstat (limited to 'guides/code/getting_started/app/views/tags')
-rw-r--r-- | guides/code/getting_started/app/views/tags/_form.html.erb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/guides/code/getting_started/app/views/tags/_form.html.erb b/guides/code/getting_started/app/views/tags/_form.html.erb new file mode 100644 index 0000000000..7e424b0e20 --- /dev/null +++ b/guides/code/getting_started/app/views/tags/_form.html.erb @@ -0,0 +1,12 @@ +<%= form.fields_for :tags do |tag_form| %> + <div class="field"> + <%= tag_form.label :name, 'Tag:' %> + <%= tag_form.text_field :name %> + </div> + <% unless tag_form.object.nil? || tag_form.object.new_record? %> + <div class="field"> + <%= tag_form.label :_destroy, 'Remove:' %> + <%= tag_form.check_box :_destroy %> + </div> + <% end %> +<% end %> |