Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<script> function afterReload(response) { $(".classroom_form").html($(".classroom_form", response)) } $(function(){ $('.reload').click(function(event) { $.ajax({ url: this.href, type: 'get', success: afterReload }); return false; }) }) </script> <%= link_to 'Reload form using Ajax', edit_classroom_path(classroom), :class => 'reload' %> <div class='classroom_form'> <p> <%= f.label :name %><br /> <%= f.text_field :name %> </p> </div>
This paste will be private.
From the Design Piracy series on my blog: