Skip to content

Commit

Permalink
disable rubocop in conference_helper_override
Browse files Browse the repository at this point in the history
  • Loading branch information
ElviaBth committed May 15, 2024
1 parent e33d7d8 commit a924f4c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/helpers/concerns/conference_helper_override.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ module ConferenceHelperOverride
included do
alias_method :decidim_conference_nav_items, :conference_nav_items

# rubocop:disable Style/SingleArgumentDig
def conference_nav_items(participatory_space)
@conference_nav_items ||= begin
divisor = Rails.application.secrets.speakers_divisor[participatory_space.slug.to_sym]
divisor = Rails.application.secrets.speakers_divisor.dig(participatory_space.slug.to_sym)
items = decidim_conference_nav_items(participatory_space)
items.first[:name] = I18n.t("capital.speakers_divisor.#{divisor.first[:name]}") if participatory_space.speakers.exists? && divisor && divisor&.first&.[](:name)
items
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- replace "#conference_speakers-grid" -->

<% divisor = Rails.application.secrets.speakers_divisor.dig(conference.slug.to_sym) %>

<% byebug %>
<section id="conference_speakers-grid">
<% if divisor && divisor.respond_to?(:each) %>
<% all_filters = divisor.pluck(:position_filter).flatten.filter(&:presence) %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- replace "erb[loud]:contains('layouts/decidim/shared/layout_two_col')" -->

<%
lay = if current_participatory_space.components.empty?
lay = if conference_nav_items(current_participatory_space).empty?
"layouts/decidim/shared/layout_center"
else
"layouts/decidim/shared/layout_two_col"
Expand Down

0 comments on commit a924f4c

Please sign in to comment.