Class: HomesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/homes_controller.rb

Constant Summary

Constants included from FlashTruncation

FlashTruncation::STRING_OVERHEAD

Instance Method Summary collapse

Methods inherited from ApplicationController

#block_api_access, #evil_parameter_hack!, #extract_header_info, #set_cache_disabled!

Methods included from FlashTruncation

#max_flash_size, #truncate_flash, #truncate_flash_array

Instance Method Details

#showObject

rubocop:todo Metrics/AbcSize



5
6
7
8
9
10
11
12
# File 'app/controllers/homes_controller.rb', line 5

def show # rubocop:todo Metrics/AbcSize
  @links = configatron.fetch(:external_applications, [])
  @pipelines = current_user.pipelines.active
  @latest_batches = current_user.batches.latest_first.limit(10).includes(:pipeline)
  @assigned_batches = current_user.batches.latest_first.where('assignee_id != user_id').limit(10).includes(:pipeline)
  @submissions = current_user.submissions.latest_first.limit(10)
  @studies = current_user.interesting_studies.newest_first.limit(10)
end