[Rails] Re: Relational DB - Related and not Related

2013-06-25 Thread Cameron Gilroy
ml { render action: "new" } format.json { render json: @user.errors, status: :unprocessable_entity } end end end On Monday, June 24, 2013 10:54:14 PM UTC+10, Cameron Gilroy wrote: > > Hi > > I'm working on a project that has users and groups, users can

[Rails] Re: Relational DB - Related and not Related

2013-06-24 Thread Cameron Gilroy
Thanks Dave & Colin! That was how I had hoped it would work! On Monday, June 24, 2013 10:54:14 PM UTC+10, Cameron Gilroy wrote: > > Hi > > I'm working on a project that has users and groups, users can be members > of a group *or* they can just be a user - what's g

[Rails] Relational DB - Related and not Related

2013-06-24 Thread Cameron Gilroy
Hi I'm working on a project that has users and groups, users can be members of a group *or* they can just be a user - what's going to be the best way to deal with this? I understand the normal has_many relationship just not sure how to do this one. Will try to post some code snippets tomorrow.