| Class | Document |
| In: |
app/models/document.rb
|
| Parent: | ActiveRecord::Base |
Document is a base class for all content in MuraveyWeb.
| cached | [rw] | Rendered version of content |
| changed | [rw] | Date of the last change |
| content_type | [rw] | MIME type of data |
| data | [rw] | Binary or text content |
| meta | [rw] | Meta instance |
| parts | [rw] | Folder that belongs to this Document, as a related media store |
| published | [rw] | Was document allowed to be shown on the site? |
| revision_comment | [RW] | |
| size | [rw] | Content size in bytes |
| symid | [rw] | Document symid |
| title | [rw] | Human-readable title |
Finds document with a given symid
@document = Document.find_by_symid("z6k7k1wyl10v2x7g7")
# File app/models/document.rb, line 81
81: def self.find_by_symid(symid)
82: Document.find_first([ 'symid=?', symid ])
83: end
# File app/models/document.rb, line 158
158: def inspect
159: "<Document: #{id}; parent: #{folder ? folder.name : '-'}; created: #{created}>"
160: end
# File app/models/document.rb, line 133
133: def is_index?
134: if Mapping.find_first([ 'document_id=?', id]) then true else false end
135: end
# File app/models/document.rb, line 145
145: def render_date
146: time = self.created
147: time.strftime("%b %d, %H:%M")
148: end