Fix Style/IndentationWidth

This commit is contained in:
Jared Beck 2016-03-13 19:59:24 -04:00
parent 6fb88dd4ee
commit 18d74690c6
3 changed files with 6 additions and 14 deletions

View File

@ -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:

View File

@ -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

View File

@ -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