Creating sweet user summary page

This commit is contained in:
2014-02-14 03:48:03 -07:00
parent 17aa2b971c
commit 03a0588073
10 changed files with 106 additions and 85 deletions

View File

@@ -18,6 +18,9 @@ class User < ActiveRecord::Base
has_many :macs
has_many :resources
scope :volunteer, -> { where('member_level >= 10 AND member_level < 25') }
scope :paying, -> { joins(:payments).where("payments.date > ?", (DateTime.now - 90.days)).uniq }
validates_format_of [:twitter_url, :facebook_url, :github_url, :website_url], :with => URI::regexp(%w(http https)), :allow_blank => true
# disable # validates_presence_of :postal_code