Skip to content

Commit

Permalink
feat: Load BETA methodology publication when BETA data are enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
martintomas committed Nov 7, 2023
1 parent ade53ec commit ac1ba47
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions app/controllers/tpi/sectors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ def index
end
@publications_and_articles = publications_and_articles
sectors_page = TPIPage.find_by(slug: 'publicly-listed-equities-content')
@methodology_description = Content.find_by(
page: sectors_page,
code: 'methodology_description'
)
@methodology_id = Content.find_by(
page: sectors_page,
code: 'methodology_publication_id'
)
@methodology_description = Content.find_by(page: sectors_page, code: 'methodology_description')
@methodology_id = Content.find_by(page: sectors_page, code: 'methodology_publication_id')
@beta_methodology_id = Content.find_by(page: sectors_page, code: 'beta_methodology_publication_id')
@methodology_id = @beta_methodology_id || @methodology_id if session[:enable_beta_mq_assessments]
@methodology_publication = Publication.find_by(id: @methodology_id&.text)

fixed_navbar('Sectors', admin_tpi_sectors_path)
Expand Down

0 comments on commit ac1ba47

Please sign in to comment.