show in a user profile who the user was invited by
This commit is contained in:
parent
857f2964d7
commit
dae138cddd
|
@ -9,6 +9,8 @@ class User < ActiveRecord::Base
|
||||||
:class_name => "Message",
|
:class_name => "Message",
|
||||||
:foreign_key => "recipient_user_id"
|
:foreign_key => "recipient_user_id"
|
||||||
has_many :tag_filters
|
has_many :tag_filters
|
||||||
|
belongs_to :invited_by_user,
|
||||||
|
:class_name => "User"
|
||||||
|
|
||||||
has_secure_password
|
has_secure_password
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,14 @@
|
||||||
|
|
||||||
<label class="required">Joined:</label>
|
<label class="required">Joined:</label>
|
||||||
<span class="d">
|
<span class="d">
|
||||||
<%= time_ago_in_words(@showing_user.created_at) %> ago
|
<%= time_ago_in_words(@showing_user.created_at) %>
|
||||||
|
<% if @showing_user.invited_by_user %>
|
||||||
|
ago, invited by
|
||||||
|
<a href="/u/<%= @showing_user.invited_by_user.username %>"><%=
|
||||||
|
@showing_user.invited_by_user.username %></a>
|
||||||
|
<% else %>
|
||||||
|
ago
|
||||||
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue