Rails passing in params to association on create method
You have two issues here:


need to find parent model first, and then build association (as group_id could be wrong)
create would try to save record, so you're trying to save twice. Use build/new instead.


    def create
      @group = Group.find(params[:group_id])
      @mapgroup = @group.mapgroups.build(mapgroup_params)

      respond_to do |format|
        if @mapgroup.save
          format.html { redirect_to groups_path, notice: 'Mapgroup crated' }
        else
          format.html { render :new, notice: 'That shit failed' }
        end
      end
    end