def create
      @trigger = Trigger.new(trigger_params)

      if @trigger.save
        @trigger.update_tags(params[:tag_ids])
        redirect_to @trigger, notice: 'Trigger was successfully created.'
      else
        render :new
      end
    end
def create
      @trigger = Trigger.new(trigger_params)

      if @trigger.save
        @trigger.update_tags(params[:tag_ids])
        redirect_to @trigger, notice: 'Trigger was successfully created.'
      else
        render :new
      end
    end
POST /triggers