From 6ba69af44b8678689d0b17f176d9be86f2ed4769 Mon Sep 17 00:00:00 2001 From: Zee Spencer <50284+zspencer@users.noreply.github.com> Date: Sun, 23 Oct 2022 13:38:09 -0700 Subject: [PATCH] Memberships: Adds Breadcrumb from Membership: Show page I noticed when working on the [Journal](https://github.com/zinc-collective/convene/issues/898) that when you click on the `Account` link, it kind of drops you into the middle of no where. This adds a breadcrumb, so we can find our way back! Yay! --- app/models/membership.rb | 4 ++++ app/views/memberships/show.html.erb | 3 ++- config/breadcrumbs.rb | 13 +++++++++++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/models/membership.rb b/app/models/membership.rb index 74417e06b..4f5927b0e 100644 --- a/app/models/membership.rb +++ b/app/models/membership.rb @@ -15,6 +15,10 @@ class Membership < ApplicationRecord validates :member, uniqueness: { scope: :space_id } + def member_name + member.display_name + end + enum status: { active: 'active', revoked: 'revoked' diff --git a/app/views/memberships/show.html.erb b/app/views/memberships/show.html.erb index 6949416b1..2856e617d 100644 --- a/app/views/memberships/show.html.erb +++ b/app/views/memberships/show.html.erb @@ -1,3 +1,4 @@ +<%- breadcrumb :show_membership, membership %>
<%= membership.member.email %>
@@ -6,4 +7,4 @@