Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<h1><%= @title.name %></h1> <table> <tr> <td valign="top"> <%= image_tag @title.full_image %> </td> <td valign="top"> <%= @title.description %> <br /> <strong>Widescreen: </strong><%= @title.widescreen ? "Yes" : "No" %> <br /> <strong>Surround Sound: </strong><%= @title.surround_sound ? "Yes" : "No" %> </td> </tr> <tr> <td> </td> <td> <% if logged_in? -%> <% if not @current_user.rentals.detect {|rental| rental.title.name == @title.name} -%> <%= link_to "Rent Now!", :controller => 'account', :action => 'add_title', :id => @title.id %> <% else -%> You have already rented this title, it is due back in on <strong><%= @current_user.rentals.find_by_title_id(@title.id).updated_at %></strong>. <% end -%> <% else -%> <strong>If you were logged in, you could rent this instantly!</strong> <%= link_to "Register Now!", :controller => 'account', :action => 'register' %> <% end -%> </td> </tr> </table>
This paste will be private.
From the Design Piracy series on my blog: