Do not use instance vars in partials
This commit is contained in:
parent
f89d73bb84
commit
45be30b8b2
5 changed files with 12 additions and 9 deletions
|
@ -2,7 +2,7 @@
|
|||
<ul class="nav nav-tabs d-none d-sm-flex">
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:overview, scope: %i[nav_tabs membership_pool]),
|
||||
@membership_pool,
|
||||
membership_pool,
|
||||
class: "nav-link #{:active if tab == :overview}" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<ul class="nav flex-column nav-pills d-flex d-sm-none">
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:overview, scope: %i[nav_tabs membership_pool]),
|
||||
@membership_pool,
|
||||
membership_pool,
|
||||
class: "nav-link #{:active if tab == :overview}" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -7,5 +7,6 @@
|
|||
</small>
|
||||
</h2>
|
||||
|
||||
<%= render partial: 'nav_tabs', locals: { tab: :overview } %>
|
||||
<%= render partial: 'nav_tabs', locals: { membership_pool: @membership_pool,
|
||||
tab: :overview } %>
|
||||
</div>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<ul class="nav nav-tabs d-none d-sm-flex">
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:overview, scope: %i[nav_tabs passport]),
|
||||
@passport,
|
||||
passport,
|
||||
class: "nav-link #{:active if tab == :overview}" %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:confirmations, scope: %i[nav_tabs passport]),
|
||||
passport_passport_confirmations_path(@passport),
|
||||
passport_passport_confirmations_path(passport),
|
||||
class: "nav-link #{:active if tab == :confirmations}" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -15,12 +15,12 @@
|
|||
<ul class="nav flex-column nav-pills d-flex d-sm-none">
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:overview, scope: %i[nav_tabs passport]),
|
||||
@passport,
|
||||
passport,
|
||||
class: "nav-link #{:active if tab == :overview}" %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<%= link_to translate(:confirmations, scope: %i[nav_tabs passport]),
|
||||
passport_passport_confirmations_path(@passport),
|
||||
passport_passport_confirmations_path(passport),
|
||||
class: "nav-link #{:active if tab == :confirmations}" %>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<div class="container">
|
||||
<%= render partial: 'passports/nav_tabs', locals: { tab: :confirmations } %>
|
||||
<%= render partial: 'passports/nav_tabs', locals: { passport: @passport,
|
||||
tab: :confirmations } %>
|
||||
|
||||
<% if @passport.can_have_confirmations? && current_account %>
|
||||
<div class="mb-3">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<div class="container">
|
||||
<%= render partial: 'nav_tabs', locals: { tab: :overview } %>
|
||||
<%= render partial: 'nav_tabs', locals: { passport: @passport,
|
||||
tab: :overview } %>
|
||||
|
||||
<div>
|
||||
<% if @passport.confirmed? %>
|
||||
|
|
Reference in a new issue