A macro for defining a method which basically does a find.
Example:
classPost<Sohm::Modelreference:user,:UserendclassUser<Sohm::Modelcollection:posts,:Postend# is the same as
classUser<Sohm::ModeldefpostsPost.find(:user_id=>self.id)endend
716
717
718
719
720
721
# File 'lib/sohm.rb', line 716defself.collection(name,model,reference=to_reference)define_methodnamedomodel=Utils.const(self.class,model)model.find(:"#{reference}_id"=>id)endend