Sha256: 16928859cdb009499376820fe81034c457e24ef0ebb47a5b3e06ed4e25595c4b
Contents?: true
Size: 986 Bytes
Versions: 26
Compression:
Stored size: 986 Bytes
Contents
module MessageTrain 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 ['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
26 entries across 26 versions & 1 rubygems