Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
def show if params[:permalink] @page_url = StaticPage.find_by_permalink(params[:permalink]) raise ActiveRecord::RecordNotFound, "Page not found" if @page_url.nil? @page = File.read("#{RAILS_ROOT}/public/static_pages/" + params[:permalink]) @graph = open_flash_chart_object(600,300,"/static_page/graph_code") else @page = StaticPage.find(params[:id]) end end def graph_code title = Title.new("MY TITLE") bar = BarGlass.new bar.set_values([1,2,3,4,5,6,7,8,9]) chart = OpenFlashChart.new chart.set_title(title) chart.add_element(bar) render :text => chart.to_s end
This paste will be private.
From the Design Piracy series on my blog: