Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
##view <div id="comments_area"> <h3 id="comments_count"><%= pluralize(@article.comments_count, 'comment') %></h3> <% cache do %> <div id="comments"> <%= render :partial => @comments %> </div> <div id="live-preview" style="display: none;" class="markdown"> </div> <div id="new_comment"> <div id="comment_form"> <% remote_form_for :comment, :url => comment_article_path(@article), :html => {:id => "comment-form"} do |f| %> <%= render :partial => 'comment_form', :locals => {:f => f, :bt_name => 'comment'} %> <% end %> </div> <%= render :partial => 'articles/comment_info' %> </div> <%= observe_form "comment-form", :frequency => 1, :update => "live-preview", :complete => "Element.show('live-preview')", :url => { :action => "preview" } %> <% end %> </div> ##controller def preview render :layout => false respond_to |format| do format.js end end
This paste will be private.
From the Design Piracy series on my blog: