From 18d74690c6fa042b9b90cc89a01a02ff9dd01ee2 Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Sun, 13 Mar 2016 19:59:24 -0400 Subject: [PATCH] Fix Style/IndentationWidth --- .rubocop_todo.yml | 8 -------- lib/paper_trail/has_paper_trail.rb | 6 +++--- spec/models/widget_spec.rb | 6 +++--- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5c92af1a..9bbbc2b8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -84,14 +84,6 @@ Style/IfUnlessModifier: Style/IndentHash: Enabled: false -# Offense count: 2 -# Cop supports --auto-correct. -# Configuration parameters: Width. -Style/IndentationWidth: - Exclude: - - 'lib/paper_trail/has_paper_trail.rb' - - 'spec/models/widget_spec.rb' - # Offense count: 4 # Cop supports --auto-correct. Style/Lambda: diff --git a/lib/paper_trail/has_paper_trail.rb b/lib/paper_trail/has_paper_trail.rb index 2ba0e2ca..ce343619 100644 --- a/lib/paper_trail/has_paper_trail.rb +++ b/lib/paper_trail/has_paper_trail.rb @@ -459,9 +459,9 @@ module PaperTrail def set_transaction_id(version) return unless self.class.paper_trail_version_class.column_names.include?("transaction_id") if PaperTrail.transaction? && PaperTrail.transaction_id.nil? - PaperTrail.transaction_id = version.id - version.transaction_id = version.id - version.save + PaperTrail.transaction_id = version.id + version.transaction_id = version.id + version.save end end diff --git a/spec/models/widget_spec.rb b/spec/models/widget_spec.rb index c5d64da4..1a619755 100644 --- a/spec/models/widget_spec.rb +++ b/spec/models/widget_spec.rb @@ -15,9 +15,9 @@ describe Widget, type: :model do end it "is possible to do assertions on versions" do - expect(widget).to have_a_version_with name: "Leonard", an_integer: 1 - expect(widget).to have_a_version_with an_integer: 1 - expect(widget).to have_a_version_with name: "Tom" + expect(widget).to have_a_version_with name: "Leonard", an_integer: 1 + expect(widget).to have_a_version_with an_integer: 1 + expect(widget).to have_a_version_with name: "Tom" end end