Re: [Rails] Re: Newbie Associations Design Question
On 12 May 2013 12:24, Polly Hay <lists@ruby-forum.com> wrote:
Could you not top post please? Insert your reply inline in previous
message, it makes it easier to follow the thread. Thanks.
> Hello Colin
>
> Thanks for your response.
>
> A user can only belong to one team. Admins will never belong to a team.
OK, that is significant.
>
> So, if I understand you correctly:
>
> Team
> has_many :users
>
> User
> belongs_to :team
> attr :admin (bool)
>
> I am concerned that an admin will have no team but the model
> "belongs_to" a team. It just doesn't feel right. It will require many
> "if" statements (in controllers?) which I understand (but could be
> wrong) isn't very mvc/oo.
Some questions. I presume that admin users will login to the
application. Is that also true of members, or are they just data
within the app? Also do members and users have attributes in common
such as name, email etc? If members do login then what can they do?
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home