Sha256: a2d41b5be25bb854c09dbcce468efd5a85cc29b6038f4dd416b90b015b678743

Contents?: true

Size: 940 Bytes

Versions: 13

Compression:

Stored size: 940 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( current_profile.per_page )
  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

13 entries across 13 versions & 1 rubygems

Version Path
ish_manager-0.1.8.468 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.467 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.466 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.465 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.464 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.463 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.462 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.461 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.460 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.459 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.458 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.457 app/controllers/ish_manager/email_conversations_controller.rb
ish_manager-0.1.8.456 app/controllers/ish_manager/email_conversations_controller.rb