2009/8/13 Wouter <wouterg...@gmail.com>:
>
> Hey,
>
> I have a small social network app and i am creating a kind of activity
> stream for a user.
> A user can post shouts and photos (models Shout and Photo).
> These 2 models have a profile_id and place_id (where shout is posted
> or photo is uploaded).
>
> What i want to do now is get an array of these 2 models (objects) to
> make an xml file like this:
>
> <objects ..>
> <shout>...</shout>
> <photo>...</photo>
> <shout>...</shout>
> ...
> </objects>
>
> I can retreive these models by place_id or by profile_id!
>
> How can I do that?
>

How have you setup the relationships (has_many, belongs_to etc) in
your models?  Or is that what you are asking how to do?

Colin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to