fix user's website links

This commit is contained in:
Lee Lawlor
2014-10-27 12:52:15 -04:00
parent 8272f17930
commit bbe46baab7
2 changed files with 8 additions and 1 deletions

View File

@ -56,6 +56,13 @@ class User < ActiveRecord::Base
cattr_reader :per_page
@@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
def time_zone_or_utc; time_zone || 'UTC'; end