mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-30 19:02:12 +02:00
fixed GitHub issue #25
This commit is contained in:
parent
f5feab59e0
commit
d79394640e
2 changed files with 4 additions and 3 deletions
app/models
|
@ -1,6 +1,7 @@
|
||||||
class Question < ActiveRecord::Base
|
class Question < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
has_many :answers
|
has_many :answers
|
||||||
|
has_many :inboxes, dependent: :destroy
|
||||||
|
|
||||||
validates :content, length: { maximum: 255 }
|
validates :content, length: { maximum: 255 }
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ class User < ActiveRecord::Base
|
||||||
dependent: :destroy
|
dependent: :destroy
|
||||||
has_many :friends, through: :active_relationships, source: :target
|
has_many :friends, through: :active_relationships, source: :target
|
||||||
has_many :followers, through: :passive_relationships, source: :source
|
has_many :followers, through: :passive_relationships, source: :source
|
||||||
has_many :smiles
|
has_many :smiles, dependent: :destroy
|
||||||
has_many :services
|
has_many :services, dependent: :destroy
|
||||||
has_many :notifications, foreign_key: :recipient_id
|
has_many :notifications, foreign_key: :recipient_id, 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
|
||||||
|
|
Loading…
Reference in a new issue