fix user's website links
This commit is contained in:
		@@ -56,6 +56,13 @@ class User < ActiveRecord::Base
 | 
				
			|||||||
  cattr_reader :per_page
 | 
					  cattr_reader :per_page
 | 
				
			||||||
  @@per_page = 50
 | 
					  @@per_page = 50
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # display the user's website correctly
 | 
				
			||||||
 | 
					  def display_website
 | 
				
			||||||
 | 
					    output = self.website
 | 
				
			||||||
 | 
					    output = "http://#{website}" if output.present? && output.index('http') != 0
 | 
				
			||||||
 | 
					    return output
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # get the user's time zone or UTC time
 | 
					  # get the user's time zone or UTC time
 | 
				
			||||||
  def time_zone_or_utc; time_zone || 'UTC'; end
 | 
					  def time_zone_or_utc; time_zone || 'UTC'; end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@
 | 
				
			|||||||
  <h2><%= t(:profile_for) %> <%= @user.login %></h2>
 | 
					  <h2><%= t(:profile_for) %> <%= @user.login %></h2>
 | 
				
			||||||
  <%= t(:member_since) %> <%= @user.created_at.strftime('%B %-d, %Y') %>
 | 
					  <%= t(:member_since) %> <%= @user.created_at.strftime('%B %-d, %Y') %>
 | 
				
			||||||
  <br><br>
 | 
					  <br><br>
 | 
				
			||||||
  <%= t(:profile_website) %>: <%= link_to @user.website, @user.website %>
 | 
					  <%= t(:profile_website) %>: <%= link_to @user.website, @user.display_website, target: '_blank' %>
 | 
				
			||||||
  <br><br>
 | 
					  <br><br>
 | 
				
			||||||
  <%= t(:profile_bio) %>: <%= @user.bio %>
 | 
					  <%= t(:profile_bio) %>: <%= @user.bio %>
 | 
				
			||||||
  <br><br>
 | 
					  <br><br>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user