Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class ThingsController < ApplicationController make_resourceful do actions :all end def create @thing = Thing.new(params[:thing]) respond_to do |format| if @thing.save flash[:notice] = 'Thing was successfully created.' format.html { redirect_to thing_url(@thing) } else format.html { render :action => "new" } end end end def update @thing = Thing.find(params[:id]) respond_to do |format| if @thing.update_attributes(params[:thing]) flash[:notice] = 'Thing was successfully updated.' format.html { redirect_to thing_url(@thing) } else format.html { render :action => "edit" } end end end def destroy @thing = Thing.find(params[:id]) @thing.destroy respond_to do |format| format.html { redirect_to things_url } end end end
This paste will be private.
From the Design Piracy series on my blog: