Cross Reference: license_model.rb
xref
: /
ontohub
/
app
/
models
/
license_model.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
license_model.rb revision fa4d8e48b630eb34132dfb2be179c6734ab3ebf6
class
LicenseModel
<
ActiveRecord
::
Base
has_and_belongs_to_many
:
ontologies
attr_accessible
:
name
, :
description
, :
url
validates
:
name
,
presence
:
true
,
uniqueness
:
true
,
length
:
{
within
:
0
..
50
}
validates
:
url
,
format
:
{
with
:
URI
::
regexp
(
Settings.allowed
_iri_schemes
)
,
allow_blank
:
true
}
def
to_s
name
end
end