Sha256: b3b63f19437217448bd9cd6866a0bd83564e01baef1fbb3b14f6faebd2639c81

Contents?: true

Size: 724 Bytes

Versions: 95

Compression:

Stored size: 724 Bytes

Contents

module ForestLiana
  class IntercomController < ForestLiana::ApplicationController
    def user_conversations
      getter = IntercomConversationsGetter.new(params)
      getter.perform

      render serializer: nil, json: serialize_models(getter.records, {
        context: { type: get_serializer_type('intercom_conversations') },
        count: getter.count
      })
    end

    def attributes
      getter = IntercomAttributesGetter.new(params)
      getter.perform

      render serializer: nil, json: serialize_model(getter.records, {
        context: { type: get_serializer_type('intercom_attributes') }
      })
    end

    def get_serializer_type(suffix)
      "#{params[:collection]}_#{suffix}"
    end
  end
end

Version data entries

95 entries across 95 versions & 1 rubygems

Version Path
forest_liana-1.3.43 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.42 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.41 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.40 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.39 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.38 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.37 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.36 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.35 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.34 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.33 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.32 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.31 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.30 app/controllers/forest_liana/intercom_controller.rb
forest_liana-1.3.29 app/controllers/forest_liana/intercom_controller.rb