From 95a898bfc4fdee4d3d57dcb6789ba7578bab9b1f Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Mon, 15 Feb 2016 20:31:10 -0500 Subject: [PATCH] Fix Lint/UnusedMethodArgument --- .rubocop_todo.yml | 7 ------- lib/paper_trail/has_paper_trail.rb | 4 +++- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 77871177..b6f078ee 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,13 +1,6 @@ # Remove these configuration records # one by one as the offenses are removed from the code base. -# Offense count: 1 -# Cop supports --auto-correct. -# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. -Lint/UnusedMethodArgument: - Exclude: - - 'lib/paper_trail/has_paper_trail.rb' - # Offense count: 1 Lint/UselessAccessModifier: Exclude: diff --git a/lib/paper_trail/has_paper_trail.rb b/lib/paper_trail/has_paper_trail.rb index f7eb30dc..588a228c 100644 --- a/lib/paper_trail/has_paper_trail.rb +++ b/lib/paper_trail/has_paper_trail.rb @@ -211,7 +211,9 @@ module PaperTrail end # Returns the objects (not Versions) as they were between the given times. - def versions_between(start_time, end_time, reify_options={}) + # TODO: Either add support for the third argument, `_reify_options`, or + # add a deprecation warning if someone tries to use it. + def versions_between(start_time, end_time, _reify_options={}) versions = send(self.class.versions_association_name).between(start_time, end_time) versions.collect { |version| version_at(version.send PaperTrail.timestamp_field) } end