Sha256: 7c8682aa3b2411c931020982771bed7b3a0424dd853ca10fbc58229cf0ad1320

Contents?: true

Size: 507 Bytes

Versions: 9

Compression:

Stored size: 507 Bytes

Contents

class SimpleDiscussion::NotificationsController < SimpleDiscussion::ApplicationController
  before_action :authenticate_user!
  before_action :set_forum_thread

  def create
    @forum_thread.toggle_subscription(current_user)
    redirect_to simple_discussion.forum_thread_path(@forum_thread)
  end

  def show
    redirect_to simple_discussion.forum_thread_path(@forum_thread)
  end

  private

    def set_forum_thread
      @forum_thread = ForumThread.friendly.find(params[:forum_thread_id])
    end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
simple_discussion-1.2.0 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-1.0.1 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-1.0.0 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-0.9.5 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-0.9.4 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-0.9.3 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-0.9.2 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-0.9.1 app/controllers/simple_discussion/notifications_controller.rb
simple_discussion-0.9.0 app/controllers/simple_discussion/notifications_controller.rb