Sha256: 5cfb9624f52f25b7e6dc0df239c7dad5531b108086301056da2e98097690d504
Contents?: true
Size: 720 Bytes
Versions: 16
Compression:
Stored size: 720 Bytes
Contents
require 'active_record' require 'active_support/concern' require 'weasel/concerns/auditable' require 'weasel/models/event' require 'weasel/workers/events_worker' require 'weasel/version' module Weasel def self.root File.expand_path('../..', __FILE__) end class Configuration attr_accessor :db_configuration end def self.config @@config ||= Configuration.new end 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 end
Version data entries
16 entries across 16 versions & 1 rubygems