fixed GitHub issue #25

This commit is contained in:
nilsding 2014-12-28 00:34:56 +01:00
parent f5feab59e0
commit d79394640e
2 changed files with 4 additions and 3 deletions

View file

@ -1,6 +1,7 @@
class Question < ActiveRecord::Base
belongs_to :user
has_many :answers
has_many :inboxes, dependent: :destroy
validates :content, length: { maximum: 255 }

View file

@ -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