Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class KwickController < ApplicationController def create @manufacturer = Manufacturer.new(params[:manufacturer]) @calibre = Calibre.new(params[:calibre]) @chambering = Chamber.new(params[:chamber]) @stock = Stock.new(params[:stock]) @stockmaterial = Stockmaterial.new(params[:stockmaterial]) @manufacturer.save unless params[:manufacturer][:name].blank? @calibre.save unless params[:calibre][:name].blank? @chambering.save unless params[:chamber][:name].blank? @stock.save unless params[:stock][:name].blank? @stockmaterial.save unless params[:stock][:name].blank? redirect_to :action => 'new', :controller => 'firearms' end end
This paste will be private.
From the Design Piracy series on my blog: