Class: HomeController

Inherits:
ApplicationController
  • Object
show all
Defined in:
lib/generators/connector/templates/home_controller.rb

Overview

TODO This controller is given as an example of a possible home Home funcitons :

  • Display generic information about the connector (mostly for not connected users)

  • Link the connector to a Maestrano organization

  • Acces the last synchronization and a synchronization history (with their status)

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
13
14
15
16
# File 'lib/generators/connector/templates/home_controller.rb', line 8

def index
  if current_user
    @organization = current_organization

    if @organization
      @synchronizations = Maestrano::Connector::Rails::Synchronization.where(organization_id: @organization.id).order(updated_at: :desc).limit(40)
    end
  end
end