On 26 June 2013 02:55, Cameron Gilroy wrote:
> Here is an update, I have it working as only a group or as only a non-group
> user. I have below the create controller and was wondering what would be the
> best way to allow associations and non-associated records. Thanks
>
> def create
> if Gr
On Tue, Jun 25, 2013 at 9:55 PM, Cameron Gilroy wrote:
> respond_to do |format|
> if @user.save && @user.group_id == nil
> format.html { redirect_to "/", notice: 'Thank you for registering!'
> }
> elsif @user.save && @user.group_id != ""
> format.html { redirect_to
Here is an update, I have it working as only a group or as only a non-group
user. I have below the create controller and was wondering what would be
the best way to allow associations and non-associated records. Thanks
def create
if Group.nil?
@group = Group.find(params[:group_id])
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 going to be the best way
> to dea
4 matches
Mail list logo