Sha256: 8bd9ea70cca84764b08de89f6af750c73903192c4766f920e0791261a2db6f95

Contents?: true

Size: 500 Bytes

Versions: 17

Compression:

Stored size: 500 Bytes

Contents

module Rearview::Concerns::Models::User
  extend ActiveSupport::Concern
  included do

    self.table_name = "users"

    has_many :monitors, :dependent => :destroy

    serialize :preferences, JSON

    validates_uniqueness_of :email
    validates_presence_of :email

    def self.valid_google_oauth2_email?(email)
      email.present? &&
      Rearview.config.authentication[:matching_emails].present? &&
      !email.match(Rearview.config.authentication[:matching_emails]).nil?
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby lib/rearview/concerns/models/user.rb
rearview-1.2.2.rc.2-jruby lib/rearview/concerns/models/user.rb
rearview-1.2.2.rc.1-jruby lib/rearview/concerns/models/user.rb
rearview-1.2.1-jruby lib/rearview/concerns/models/user.rb
rearview-1.2.0-jruby lib/rearview/concerns/models/user.rb
rearview-1.1.2-jruby lib/rearview/concerns/models/user.rb
rearview-1.1.1-jruby lib/rearview/concerns/models/user.rb
rearview-1.1.0-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.3.rc.4-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.3.rc.3-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.3.rc.2-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.3.rc.1-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.2-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.2.rc.4-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.2.rc.3-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.2.rc.2-jruby lib/rearview/concerns/models/user.rb
rearview-1.0.2.rc.1-jruby lib/rearview/concerns/models/user.rb