Fix test i broke with ssk key validation. Added Key.user_id as attr_protected

This commit is contained in:
Dmitriy Zaporozhets 2012-08-29 07:58:22 +03:00
parent 5afb16e496
commit adc71b6a6a
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