Door log filtering, user case-insensitive and status-insensitive sorting, new user scope

Presumably changed by meznak or blhack, not myself
This commit is contained in:
2016-09-12 20:56:31 -07:00
parent 96a748ba0b
commit 6957ab7ac1
4 changed files with 13 additions and 10 deletions

View File

@@ -21,6 +21,7 @@ class User < ActiveRecord::Base
has_many :resources
scope :volunteer, -> { where('member_level >= 10 AND member_level < 25') }
scope :active, -> { where('member_level >= 10') }
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