-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix unassigned variable warning Fix `warning: assigned but unused variable - comp` warning * Remove frozen string literals from `arb` templates It does not have effect there and outputs a warning when running tests with `RUBYOPTS='-w' rake` ``` warning: 'frozen_string_literal' is ignored after any tokens ``` Behavior tested in `empty.arb` template ``` # frozen_string_literal: true hello = 'hello' hello.concat ' world' ``` Expected: fail Actual: pass Close #649 * Enable some `Lint` cops to prevent warnings Parity with ActiveAdmin to prevent introduction of new warnings Manually fix a `Lint/UselessAssignment` warning Ref: activeadmin/activeadmin#8597
- Loading branch information
Showing
10 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# frozen_string_literal: true | ||
para "Hello from a partial" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# frozen_string_literal: true | ||
para "Partial: #{my_instance_var}" |
1 change: 0 additions & 1 deletion
1
spec/rails/templates/arbre/page_with_arb_partial_and_assignment.arb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# frozen_string_literal: true | ||
h1 "Before Partial" | ||
render "arbre/partial_with_assignment" | ||
h2 "After Partial" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
# frozen_string_literal: true | ||
h1 my_instance_var |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# frozen_string_literal: true | ||
h1 "Before Partial" | ||
render "erb/partial" | ||
h2 "After Partial" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# frozen_string_literal: true | ||
h1 "Before Partial" | ||
render "arbre/partial" | ||
h2 "After Partial" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# frozen_string_literal: true | ||
render_in_object = Class.new do | ||
def render_in(_, &block) | ||
block.call | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# frozen_string_literal: true | ||
html do | ||
head do | ||
end | ||
|