Merge branch 'master' into issue_status_changed_notifications

This commit is contained in:
Alex Denisov 2012-08-29 11:42:15 +03:00
commit 2703fe3e72
4 changed files with 10 additions and 8 deletions

View file

@ -4,13 +4,15 @@ class Key < ActiveRecord::Base
belongs_to :user
belongs_to :project
attr_protected :user_id
validates :title,
presence: true,
length: { within: 0..255 }
validates :key,
presence: true,
:format => { :with => /ssh-.{3} / },
format: { :with => /ssh-.{3} / },
length: { within: 0..5000 }
before_save :set_identifier