Ruby on Rails
Wednesday, August 11, 2010
On Wed, Aug 11, 2010 at 2:26 PM, Marnen Laibow-Koser <lists@ruby-forum.com> wrote:
Rick R wrote:Are these notice groups specific to the one user, or are they more like
> My initial example is probably confusing. Here is another shot at it in
> something that has more meaning:
>
> A User can create multiple "notices" ( eg "Corporate meeting notice",
> "Big
> Sale Items", "Job Wanted" )
> A User can create multiple "notice groups" (eg "Corporate Notices",
> "Public
> Notices", "My Miscellaneous Notices")
global discussion topics?
They are "created by one user" but multiple users can subscribe to them:
"A User needs to be able to subscribe to multiple "notice groups" so that they could see the notices in the different groups they're subscribed to."
Can notice groups contain notices created by users other than the one
who created the group?
No.
Sure. Just give the associations different names.
> How would I also model that a "NoticeGroup" is 'owned/created' by a
> particular user? Right now the HABTM on NoticeGroup seems to imply that
> the
> NoticeGroup can belong to many Users but I also need it to show that its
> owned/created by a particular User (owner_id concept on NoticeGroup?),
> can I
> have a HABTM :users and a belongs_to :User in the same NoticeGroup model
> definition?
>
Ok, I'll look into that. thanks.
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment