def subscribe
      security_transgression_unless @thread.can_subscribe?(@user)

      @thread.errors.add(:base, t('commontator.subscription.errors.already_subscribed')) \
        unless @thread.subscribe(@user)

      respond_to do |format|
        format.html { redirect_to @thread }
        format.js { render :subscribe }
      end

    end
def subscribe
      security_transgression_unless @thread.can_subscribe?(@user)

      @thread.errors.add(:base, t('commontator.subscription.errors.already_subscribed')) \
        unless @thread.subscribe(@user)

      respond_to do |format|
        format.html { redirect_to @thread }
        format.js { render :subscribe }
      end

    end
PUT /threads/1/subscribe