Commit d0aa98bc authored by Adam Niedzielski's avatar Adam Niedzielski

Add Member#expires? method.

parent 28fc9088
...@@ -125,6 +125,10 @@ class Member < ActiveRecord::Base ...@@ -125,6 +125,10 @@ class Member < ActiveRecord::Base
invite? || request? invite? || request?
end end
def expires?
expires_at.present?
end
def accept_request def accept_request
return false unless request? return false unless request?
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
= time_ago_with_tooltip(member.requested_at) = time_ago_with_tooltip(member.requested_at)
- else - else
Joined #{time_ago_with_tooltip(member.created_at)} Joined #{time_ago_with_tooltip(member.created_at)}
- if member.expires_at.present? - if member.expires?
%span.prepend-left-20 %span.prepend-left-20
Access expires #{member.expires_at.to_s(:medium)} Access expires #{member.expires_at.to_s(:medium)}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment