Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
def must_have_only_one_current_quiz errors.add(:is_current, 'should have only one current status') if self.is_current_equals(true).length > 1 end ## in Console >> Location.country_equals('Indonesia').length => 3 >> cq = Quiz.new(:name => 'ano', :is_current => true) => #<Quiz id: nil, name: "ano", created_at: nil, updated_at: nil, is_current: true> >> cq.save NoMethodError: undefined method `is_current_equals' for #<Quiz:0x10339e1b8>
This paste will be private.
From the Design Piracy series on my blog: