Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class AddOpenForComments < ActiveRecord::Migration def self.up Article.find_all.each do |article| if article.comments.size == 0 Comment.new do |comment| comment.name = 'Welcome.' comment.body = "Article '#{article.name}' is open for comments." article.comments << comment comment.save article.save end end end end def self.down end end
This paste will be private.
From the Design Piracy series on my blog: