Sha256: 4a03c80af6c8202cf6e66671744d8559544ec5922433a6083ecc0a85f207dd48
Contents?: true
Size: 1002 Bytes
Versions: 19
Compression:
Stored size: 1002 Bytes
Contents
module MessageTrain # Conversations controller class ConversationsController < MessageTrain::ApplicationController before_filter :load_conversation after_filter :mark_as_read # GET /box/:division/conversations/:id def show @messages = @conversation.messages.page(params[:page]) render :show @box.mark :read, @messages end # PATCH/PUT /box/:division/conversations/:id 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/conversations/:id def destroy if %w( ignore unignore ).include? params[:mark_to_set] @box.send(params[:mark_to_set], @conversation) end respond_to_marking end private def load_conversation @conversation = @box.find_conversation(params[:id]) end def mark_as_read @box.mark :read, conversations: @conversation end end end
Version data entries
19 entries across 19 versions & 1 rubygems