summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorAlessandro Desantis <desa.alessandro@gmail.com>2020-06-16 16:04:57 +0200
committerAlessandro Desantis <desa.alessandro@gmail.com>2020-06-16 16:07:05 +0200
commitb5125e83d535adebbe353a9216ed0c0f0b496d92 (patch)
tree5c56ad51a6e5372efa3748c0570595068f63481b /app/views
parentfabde7f1751cddb74ce9e9e51a946fbfe318a272 (diff)
Use a local variable in `_subscription_tabs` partial
Diffstat (limited to 'app/views')
-rw-r--r--app/views/spree/admin/installments/index.html.erb2
-rw-r--r--app/views/spree/admin/shared/_subscription_tabs.html.erb4
-rw-r--r--app/views/spree/admin/subscriptions/edit.html.erb2
3 files changed, 4 insertions, 4 deletions
diff --git a/app/views/spree/admin/installments/index.html.erb b/app/views/spree/admin/installments/index.html.erb
index 1e8849b..483cf4d 100644
--- a/app/views/spree/admin/installments/index.html.erb
+++ b/app/views/spree/admin/installments/index.html.erb
@@ -2,7 +2,7 @@
<%= render 'spree/admin/shared/subscription_breadcrumbs', subscription: @subscription %>
<%= render 'spree/admin/shared/subscription_sidebar', subscription: @subscription %>
-<%= render 'spree/admin/shared/subscription_tabs', current: :installments %>
+<%= render 'spree/admin/shared/subscription_tabs', current: :installments, subscription: @subscription %>
<%= render 'spree/admin/shared/subscription_actions', subscription: @subscription %>
<fieldset class="no-border-bottom">
diff --git a/app/views/spree/admin/shared/_subscription_tabs.html.erb b/app/views/spree/admin/shared/_subscription_tabs.html.erb
index ea64e62..7c00486 100644
--- a/app/views/spree/admin/shared/_subscription_tabs.html.erb
+++ b/app/views/spree/admin/shared/_subscription_tabs.html.erb
@@ -2,10 +2,10 @@
<nav>
<ul class='tabs' data-hook="admin_subscription_tab_options">
<li<%== ' class="active"' if current == :details %>>
- <%= link_to t("spree.admin.subscriptions.edit.details"), spree.edit_admin_subscription_path(@subscription) %>
+ <%= link_to t("spree.admin.subscriptions.edit.details"), spree.edit_admin_subscription_path(subscription) %>
</li>
<li<%== ' class="active"' if current == :installments %>>
- <%= link_to t("spree.admin.subscriptions.edit.installments"), spree.admin_subscription_installments_path(@subscription) %>
+ <%= link_to t("spree.admin.subscriptions.edit.installments"), spree.admin_subscription_installments_path(subscription) %>
</li>
</ul>
</nav>
diff --git a/app/views/spree/admin/subscriptions/edit.html.erb b/app/views/spree/admin/subscriptions/edit.html.erb
index c4d5772..e42995c 100644
--- a/app/views/spree/admin/subscriptions/edit.html.erb
+++ b/app/views/spree/admin/subscriptions/edit.html.erb
@@ -2,7 +2,7 @@
<%= render 'spree/admin/shared/subscription_breadcrumbs', subscription: @subscription %>
<%= render 'spree/admin/shared/subscription_sidebar', subscription: @subscription %>
-<%= render 'spree/admin/shared/subscription_tabs', current: :details %>
+<%= render 'spree/admin/shared/subscription_tabs', current: :details, subscription: @subscription %>
<%= render 'spree/admin/shared/subscription_actions', subscription: @subscription %>
<%= form_for @subscription, url: spree.admin_subscription_path(@subscription) do |f| %>