added associations for this

This commit is contained in:
nilsding 2014-12-28 21:47:51 +01:00
parent 2c29dd9a18
commit bb3e431393
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,8 @@ class User < ActiveRecord::Base
has_many :services, dependent: :destroy has_many :services, dependent: :destroy
has_many :notifications, foreign_key: :recipient_id, dependent: :destroy has_many :notifications, foreign_key: :recipient_id, dependent: :destroy
has_many :reports, dependent: :destroy has_many :reports, dependent: :destroy
has_many :moderation_comments, dependent: :destroy
has_many :moderation_votes, dependent: :destroy
SCREEN_NAME_REGEX = /\A[a-zA-Z0-9_]{1,16}\z/ SCREEN_NAME_REGEX = /\A[a-zA-Z0-9_]{1,16}\z/
WEBSITE_REGEX = /https?:\/\/([A-Za-z.\-]+)\/?(?:.*)/i WEBSITE_REGEX = /https?:\/\/([A-Za-z.\-]+)\/?(?:.*)/i