Sha256: 83cc28ba1ce046e9d91463df3a3b567ffb011c3bea16b62efa424b19bd744e96
Contents?: true
Size: 620 Bytes
Versions: 3
Compression:
Stored size: 620 Bytes
Contents
module ThinkFeelDoDashboard # Display the membership status for a participant and membership module ParticipantsHelper def membership_status(participant, membership) if participant_active?(participant, membership) "<span class=\"label label-success\">Active</span> ".html_safe else "<span class=\"label label-danger\">Inactive</span> ".html_safe end end private def participant_active?(participant, membership) participant .memberships .active .where("memberships.is_complete = false") .include?(membership) end end end
Version data entries
3 entries across 3 versions & 1 rubygems