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, process_base_module_list, process_base_modules, register_set, register_set_format, shortname, view, write_tmp_file
Instance Method Details
#clean_html? ⇒ Boolean
35
36
37
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 35
def clean_html?
true
end
|
#clear_drafts ⇒ Object
47
48
49
50
51
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 47
def clear_drafts
drafts.created_by(Card::Auth.current_id).each do |draft|
draft.delete
end
end
|
5
6
7
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 5
def content
db_content or (new_card? && template.db_content)
end
|
#content=(value) ⇒ Object
9
10
11
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 9
def content=(value)
self.db_content = value
end
|
27
28
29
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 27
def creator
Card[ creator_id ]
end
|
#history? ⇒ Boolean
39
40
41
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 39
def history?
false
end
|
23
24
25
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 23
def label
name
end
|
#raw_content ⇒ Object
13
14
15
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 13
def raw_content
structure ? template.db_content : content
end
|
#save_content_draft(content) ⇒ Object
43
44
45
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 43
def save_content_draft content
clear_drafts
end
|
31
32
33
|
# File 'tmpsets/set/mod001-01_core/all/content.rb', line 31
def updater
Card[ updater_id ]
end
|