Skip to content

Commit

Permalink
Fix duplicate decleration warnings (collectiveidea#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrisker authored and jmnsf committed Jul 28, 2023
1 parent db1b1d0 commit e7af7a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Fixed
[#390](https://github.com/collectiveidea/audited/pull/390)
- Passing an invalid version to `revision` returns `nil` instead of last version
[#384](https://github.com/collectiveidea/audited/pull/384)
- Fix duplicate deceleration warnings
[#399](https://github.com/collectiveidea/audited/pull/399)


## 4.5.0 (2017-05-22)
Expand Down
5 changes: 3 additions & 2 deletions lib/audited.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
module Audited
class << self
attr_accessor :ignored_attributes, :current_user_method, :audit_class
attr_accessor :ignored_attributes, :current_user_method
attr_writer :audit_class

def audit_class
@audit_class || Audited::Adapters::ActiveRecord::Audit
@audit_class ||= Audited::Adapters::ActiveRecord::Audit
end

def store
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require 'rspec/rails'
require 'audited'
require 'audited_spec_helpers'
require 'support/active_record/models'

SPEC_ROOT = Pathname.new(File.expand_path('../', __FILE__))

Expand Down

0 comments on commit e7af7a8

Please sign in to comment.