1
0
Fork 0

Add method MembershipApp#resolved?

This commit is contained in:
Alex Kotov 2018-12-15 10:27:00 +05:00
parent 9ab7c5213e
commit c073717a0d
No known key found for this signature in database
GPG key ID: 4E831250F47DE154
3 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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 %>

View file

@ -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