Cross Reference: key.rb
xref
: /
ontohub
/
app
/
models
/
key.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
key.rb revision 664a966954a0d661e25577d2e7f74c12bcb67c9f
4139
N/A
# A users SSH Key
4139
N/A
class
Key
<
ActiveRecord
::
Base
4139
N/A
4139
N/A
include
Key
::
Fingerprint
4139
N/A
include
Key
::
Filesystem
4139
N/A
4139
N/A
belongs_to
:
user
4139
N/A
4139
N/A
attr_accessible
:
key
, :
name
4139
N/A
4139
N/A
strip_attributes
:
only
=> [:
key
, :
name
]
4139
N/A
4139
N/A
validates
:
name
,
presence
:
true
,
length
:
{
within
:
0
..
50
}
4139
N/A
validates
:
key
,
presence
:
true
,
length
:
{
within
:
0
..
5000
},
format
:
{
with
: /\A
(
ssh
|
ecdsa
)
-.*\Z/ },
uniqueness
:
true
4139
N/A
4139
N/A
def
shell_id
4139
N/A
"key-#{id}"
4139
N/A
end
4139
N/A
4139
N/A
end
4139
N/A