Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
def users_within_country country_clans = self.find_all_by_country(self.country) unless country_clans.empty? clans_users = [] country_clans.each do |clan| clans_users += clan.users end results = attach_needed_user_data(clans_users) else results = [] end results end ## Rails console >> flc => #<Clan id: 9, name: "Francis Low's Clan", created_at: "2009-11-12 03:29:29", updated_at: "2009-11-12 03:29:29", country: "undisclosed location"> >> country_clans = Clan.find_all_by_country(flc.country) => [#<Clan id: 9, name: "Francis Low's Clan", created_at: "2009-11-12 03:29:29", updated_at: "2009-11-12 03:29:29", country: "undisclosed location">] >> flc.users_within_country NoMethodError: undefined method `find_all_by_country' for #<Clan:0x1031f50c8>
This paste will be private.
From the Design Piracy series on my blog: