Sha256: ed981891a6bbcfd26ca8e6ec2c6744045e8b06ba6d1f7956bcbf9b416fd9e4ce

Contents?: true

Size: 765 Bytes

Versions: 19

Compression:

Stored size: 765 Bytes

Contents

module MessageTrain
  # Boxes controller
  class BoxesController < MessageTrain::ApplicationController
    before_filter :load_conversations

    # GET /box/:division
    def show
      @conversations = @conversations.page(params[:page])
      render :show
    end

    # PATCH/PUT /box/:division
    def update
      if params[:mark_to_set].present? && @objects.present?
        @box.mark(params[:mark_to_set], @objects)
      end
      respond_to_marking
    end

    # DELETE /box/:division
    def destroy
      if %w( ignore unignore ).include? params[:mark_to_set]
        @box.send(params[:mark_to_set], @objects)
      end
      respond_to_marking
    end

    private

    def load_conversations
      @conversations = @box.conversations
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
message_train-0.6.17 app/controllers/message_train/boxes_controller.rb
message_train-0.6.16 app/controllers/message_train/boxes_controller.rb
message_train-0.6.15 app/controllers/message_train/boxes_controller.rb
message_train-0.6.14 app/controllers/message_train/boxes_controller.rb
message_train-0.6.13 app/controllers/message_train/boxes_controller.rb
message_train-0.6.12 app/controllers/message_train/boxes_controller.rb
message_train-0.6.11 app/controllers/message_train/boxes_controller.rb
message_train-0.6.10 app/controllers/message_train/boxes_controller.rb
message_train-0.6.9 app/controllers/message_train/boxes_controller.rb
message_train-0.6.8 app/controllers/message_train/boxes_controller.rb
message_train-0.6.7 app/controllers/message_train/boxes_controller.rb
message_train-0.6.6 app/controllers/message_train/boxes_controller.rb
message_train-0.6.5 app/controllers/message_train/boxes_controller.rb
message_train-0.6.4 app/controllers/message_train/boxes_controller.rb
message_train-0.6.3 app/controllers/message_train/boxes_controller.rb
message_train-0.6.2 app/controllers/message_train/boxes_controller.rb
message_train-0.6.1 app/controllers/message_train/boxes_controller.rb
message_train-0.6.0 app/controllers/message_train/boxes_controller.rb
message_train-0.5.3 app/controllers/message_train/boxes_controller.rb