Module: Weasel
- Defined in:
- lib/weasel.rb,
lib/weasel/version.rb,
lib/weasel/models/event.rb,
lib/weasel/concerns/auditable.rb,
lib/weasel/workers/events_worker.rb
Defined Under Namespace
Modules: Auditable
Classes: Configuration, Event, EventsWorker
Constant Summary
collapse
- VERSION =
"3.1.0"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.config ⇒ Object
18
19
20
|
# File 'lib/weasel.rb', line 18
def self.config
@@config ||= Configuration.new
end
|
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/weasel.rb', line 22
def self.configure
yield config
ActiveRecord::Base.establish_connection(config.db_configuration)
ActionController::Base.extend(Weasel)
ActionController::Base.send(:include, Weasel::Auditable)
end
|
.root ⇒ Object
10
11
12
|
# File 'lib/weasel.rb', line 10
def self.root
File.expand_path('../..', __FILE__)
end
|
Instance Method Details
#audit_with_weasel(*args) ⇒ Object
2
3
4
|
# File 'lib/weasel/concerns/auditable.rb', line 2
def audit_with_weasel(*args)
around_action :audit, only: args
end
|