Cross Reference: serialization.rb
xref
: /
ontohub
/
app
/
models
/
serialization.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
serialization.rb revision 7c5e9db9a07461d92c007563a2a27ca42ce93bae
class
Serialization
<
ActiveRecord
::
Base
belongs_to
:
language
validates_presence_of
:
name
, :
mimetype
attr_accessible
:
name
, :
extension
, :
mimetype
, :
language_id
MIMETYPES
= %w
(
text
image
video
audio
application
multipart
message
model
example
)
def
to_s
name
end
def
full_name
"#{name}.#{extension}"
end
def
full_name_with_type
"#{full_name} (#{mimetype})"
end
end