User: show github username in profile
This commit is contained in:
parent
56135da720
commit
cd554c410c
|
@ -115,7 +115,13 @@ class User < ActiveRecord::Base
|
||||||
attrs.push :about
|
attrs.push :about
|
||||||
|
|
||||||
h = super(:only => attrs)
|
h = super(:only => attrs)
|
||||||
h[:avatar_url] = avatar_url
|
|
||||||
|
h[:avatar_url] = self.avatar_url
|
||||||
|
|
||||||
|
if self.github_username.present?
|
||||||
|
h[:github_username] = self.github_username
|
||||||
|
end
|
||||||
|
|
||||||
h
|
h
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -115,6 +115,16 @@
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<% if @showing_user.github_username.present? %>
|
||||||
|
<label class="required">GitHub:</label>
|
||||||
|
|
||||||
|
<span class="d">
|
||||||
|
<a href="https://github.com/<%= h(@showing_user.github_username)
|
||||||
|
%>">https://github.com/<%= h(@showing_user.github_username) %></a>
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if @showing_user.is_active? %>
|
<% if @showing_user.is_active? %>
|
||||||
<label class="required"><%= t('.about') %></label>
|
<label class="required"><%= t('.about') %></label>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue