module Weasel

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/weasel.rb, line 18
def self.config
  @@config ||= Configuration.new
end
configure() { |config| ... } click to toggle source
# File lib/weasel.rb, line 22
def self.configure
  yield config

  # Connect to current AR connection.
  ActiveRecord::Base.establish_connection(config.db_configuration)

  # Extend ActionController with the `audit_with_weasel` method.
  ActionController::Base.extend(Weasel)
  ActionController::Base.send(:include, Weasel::Auditable)
end
root() click to toggle source
# File lib/weasel.rb, line 10
def self.root
  File.expand_path('../..', __FILE__)
end

Public Instance Methods

audit_with_weasel(*args) click to toggle source
# File lib/weasel/concerns/auditable.rb, line 2
def audit_with_weasel(*args)
  around_action :audit, only: args
end