Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: a234fde441
Fetching contributors…

Cannot retrieve contributors at this time

70 lines (57 sloc) 1.986 kb
<% javascript :defaults %>
<%= error_messages_for :project %>
<% form_for @project do |project_form| -%>
<p>
<%= project_form.label :name, "Project:" %>
<%= project_form.text_field :name %>
</p>
<p>
<% project_form.fields_for :author do |author_form| %>
<%= author_form.label :name, "Author name:" %>
<%= author_form.text_field :name %>
<%= author_form.label :raise_exception, "Raise exception:" %>
<%= author_form.check_box :raise_exception %>
<% end %>
</p>
<div id="tasks">
<% project_form.fields_for :tasks do |task_form| %>
<div class="task">
<p>
<%= task_form.label :name, "Task:" %>
<%= task_form.text_field :name %>
<%= task_form.label :raise_exception, "Raise exception:" %>
<%= task_form.check_box :raise_exception %>
<!-- Uses JS to hide this `task' and set a hidden_field with the name
`_delete' to "1" which causes the record to be deleted. -->
<%= remove_link_unless_new_record(task_form) %>
</p>
</div>
<% end %>
</div>
<p>
<%= add_task_link "Add a task", project_form %>
</p>
<div id="tags">
<% project_form.fields_for :tags do |tag_form| %>
<div class="tag">
<p>
<%= tag_form.label :name, "Tag:" %>
<%= tag_form.text_field :name %>
<%= tag_form.label :raise_exception, "Raise exception:" %>
<%= tag_form.check_box :raise_exception %>
<% unless tag_form.object.new_record? %>
<!-- For existing records we add a checkbox to be able to delete records. -->
<%= tag_form.label :_delete, "Remove:" %>
<%= tag_form.check_box :_delete %>
<% end %>
</p>
</div>
<% end %>
</div>
<p>
<%= add_tag_link "Add a tag", project_form %>
</p>
<p>
<%= project_form.submit "Submit" %>
</p>
<% end -%>
Jump to Line
Something went wrong with that request. Please try again.