Sha256: 85d2623e4644da61d3d3656edf41ce927ae3d88b38d2fc09f7b0b4c00926ff84

Contents?: true

Size: 906 Bytes

Versions: 6

Compression:

Stored size: 906 Bytes

Contents

class ::IshManager::EmailConversationsController < IshManager::ApplicationController

  before_action :set_lists

  def index
    authorize! :email_conversations_index, IshManager::Ability
    @email_conversations = ::Office::EmailConversation.all

    if params[:slug]
      @email_conversations = @email_conversations.in_emailtag( params[:slug] )
    end
    if params[:not_slug]
      @email_conversations = @email_conversations.not_in_emailtag(params[:not_slug])
    end
    @email_conversations = @email_conversations.order_by( latest_at: :desc ).page( params[:conv_page] ).per( 25 )
  end

  def show
    authorize! :email_conversations_show, IshManager::Ability
    @email_conversation = ::Office::EmailConversation.find( params[:id] )
    @email_messages = @email_conversation.email_messages.order_by( date: :asc )
    @email_conversation.update_attributes({ state: Conv::STATE_READ })
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ish_manager-0.1.8.455 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.454 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.453 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.452 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.451 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.450 app/controllers/ish_manager/email_conversations_controller.rb