Rework of milestones

This commit is contained in:
Dmitriy Zaporozhets 2012-12-14 08:34:05 +03:00
parent b01f8b63c2
commit 190e483fb4
8 changed files with 72 additions and 34 deletions

View file

@ -22,7 +22,7 @@ class Snippet < ActiveRecord::Base
belongs_to :author, class_name: "User"
has_many :notes, as: :noteable, dependent: :destroy
delegate :name, :email, to: :author, prefix: true
delegate :name, :email, to: :author, prefix: true, allow_nil: true
validates :author, presence: true
validates :project, presence: true