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
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
|
|
|
@ -115,6 +115,16 @@
|
|||
</span>
|
||||
<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? %>
|
||||
<label class="required"><%= t('.about') %></label>
|
||||
|
||||
|
|
Loading…
Reference in a new issue