Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class Attachment < ActiveRecord::Base validates_presense_of :title has_attached_file :image, :styles => {:default => '720x720', :thumb => '80x80', :tiny => '40x40'} has_attached_file :video end class AttachmentsController < ApplicationController def create @attachment = Attachment.new(params[:attachment]) respond_to do |format| if @attachment.save flash[:message] = 'ok' format.html { render :action => "index" } format.xml { render :xml => @attachment, :status => :created } else flash[:message] = 'error' format.html { render :action => "new" } format.xml { render :xml => @attachment.errors, :status => :unprocessable_entity } end end end end
This paste will be private.
From the Design Piracy series on my blog: