DanIvovich.com

website = brain.collect{ |thought| thought.to_post if thought.useful? }

DanIvovich.com

website = brain.collect do |thought|   thought.to_post if thought.useful? end
07 Feb 2013

Sometimes a little more configuration is necessary.

If the name of the polymorphic relationship for a belongs_to has the same name as one of the belonging classes and two instances of two different belong_to classes have the same ID, they will report each others’ instances.

Read more at my company blog post on polymorphic has_many.