mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:19:53 +01:00
fixed GitHub issue #25
This commit is contained in:
parent
f5feab59e0
commit
d79394640e
2 changed files with 4 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
class Question < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
has_many :answers
|
||||
has_many :inboxes, dependent: :destroy
|
||||
|
||||
validates :content, length: { maximum: 255 }
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ class User < ActiveRecord::Base
|
|||
dependent: :destroy
|
||||
has_many :friends, through: :active_relationships, source: :target
|
||||
has_many :followers, through: :passive_relationships, source: :source
|
||||
has_many :smiles
|
||||
has_many :services
|
||||
has_many :notifications, foreign_key: :recipient_id
|
||||
has_many :smiles, dependent: :destroy
|
||||
has_many :services, dependent: :destroy
|
||||
has_many :notifications, foreign_key: :recipient_id, dependent: :destroy
|
||||
|
||||
SCREEN_NAME_REGEX = /\A[a-zA-Z0-9_]{1,16}\z/
|
||||
WEBSITE_REGEX = /https?:\/\/([A-Za-z.\-]+)\/?(?:.*)/i
|
||||
|
|
Loading…
Reference in a new issue