Module: LogBook
- Defined in:
- lib/log_book.rb,
lib/log_book/version.rb
Defined Under Namespace
Modules: Plugin, Utils
Classes: Event, MigrationGenerator
Constant Summary
collapse
- OPERATIONS =
{
:create => "create",
:update => "update",
:destroy => "destroy"
}
- VERSION =
"0.9.1"
- @@muted =
false
Class Method Summary
collapse
Class Method Details
.event(historian, historizable, differences, tag_list) ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/log_book.rb', line 17
def self.event(historian, historizable, differences, tag_list)
return if @@muted
tag_list_composed = []
tag_list_composed << scope_tag(historian) if historian
tag_list_composed << kind_tag(historizable) if historizable
tag_list_composed += [tag_list].flatten if tag_list
LogBook::Event.create!(
:historian => historian,
:historizable => historizable,
:differences => differences,
:tag_list => tag_list_composed
)
end
|
.muted ⇒ Object
37
38
39
|
# File 'lib/log_book.rb', line 37
def self.muted
@@muted
end
|
.muted=(value) ⇒ Object
33
34
35
|
# File 'lib/log_book.rb', line 33
def self.muted=(value)
@@muted = value
end
|