Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 71b9f31224
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (40 sloc) 1.19 kb
<div class="container">
<div class="row">
<div class="span10 columns offset2">
<h1>Tasks</h1>
<table id="task_list" class="zebra-striped">
<tr>
<th>Name</th>
<th>Finished?</th>
<th></th>
</tr>
<%= render @tasks %>
</table>
<br />
<%= form_for Task.new, :html => { :remote => true, :style => 'margin-bottom:0;' } do |f| %>
<fieldset>
<legend>New Task</legend>
<div class="clearfix">
<%= f.label :name, :class => 'large' %>
<div class="input">
<div class="input-append">
<%= f.text_field :name, :class => "large", :id => 'new-task-text' %>
<label class="add-on">
<%= f.check_box :finished %>
</label>
</div>
</div>
</div>
<div class="actions">
<%= f.submit :class => 'btn primary' %>
</div>
</fieldset>
<% end %>
</div>
</div>
</div>
<script type="text/javascript">
$('.task_finished').live('change', function() {
$(this).parents('form:first').submit();
});
</script>
Jump to Line
Something went wrong with that request. Please try again.