Module: Card::Set::All::Content
- Extended by:
- Card::Set
- Defined in:
- tmpsets/set/mod001-01_core/all/content.rb
Instance Method Summary
collapse
Methods included from Card::Set
abstract_set?, all_set?, card_accessor, card_reader, card_writer, clean_empty_module_from_hash, clean_empty_modules, define_active_job, define_event_method, define_event_perform_later_method, define_on_format, ensure_set, event, extended, format, phase_method, process_base_module_list, process_base_modules, register_set, register_set_format, shortname, view, write_tmp_file
Instance Method Details
#clean_html? ⇒ Boolean
36
37
38
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 36
def clean_html?
true
end
|
#clear_drafts ⇒ Object
48
49
50
51
52
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 48
def clear_drafts
drafts.created_by(Card::Auth.current_id).each do |draft|
draft.delete
end
end
|
6
7
8
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 6
def content
db_content or (new_card? && template.db_content)
end
|
#content=(value) ⇒ Object
10
11
12
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 10
def content=(value)
self.db_content = value
end
|
28
29
30
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 28
def creator
Card[ creator_id ]
end
|
#history? ⇒ Boolean
40
41
42
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 40
def history?
false
end
|
24
25
26
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 24
def label
name
end
|
#raw_content ⇒ Object
14
15
16
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 14
def raw_content
structure ? template.db_content : content
end
|
#save_content_draft(content) ⇒ Object
44
45
46
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 44
def save_content_draft content
clear_drafts
end
|
32
33
34
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 32
def updater
Card[ updater_id ]
end
|