Add method MembershipApp#resolved?
This commit is contained in:
parent
9ab7c5213e
commit
c073717a0d
3 changed files with 7 additions and 1 deletions
|
@ -25,4 +25,8 @@ class MembershipApp < ApplicationRecord
|
|||
self.organization_membership = nil if organization_membership.blank?
|
||||
self.comment = nil if comment.blank?
|
||||
end
|
||||
|
||||
def resolved?
|
||||
person.present?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="container">
|
||||
<% if @membership_app.person %>
|
||||
<% if @membership_app.resolved? %>
|
||||
<h1><%= translate '.congratulations' %></h1>
|
||||
<p class="lead"><%= translate '.lead_congratulations' %></p>
|
||||
<% else %>
|
||||
|
|
|
@ -32,6 +32,8 @@ RSpec.describe MembershipApp do
|
|||
|
||||
it { is_expected.to validate_uniqueness_of :account_id }
|
||||
|
||||
pending '#resolved?'
|
||||
|
||||
describe '#email' do
|
||||
def allow_value(*)
|
||||
super.for :email
|
||||
|
|
Reference in a new issue