File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,7 @@ module GitHub
99 class RailsControllerRenderLiteral < Base
1010 include RenderLiteralHelpers
1111
12- MSG = "render must be used with a string literal or an instance of a Class"
13-
14- LOCALS_MSG = "render must be used with a hash literal for the locals keyword argument"
12+ MSG = "render must be used with a string literal or an instance of a Class, and use literals for locals keys"
1513
1614 def_node_matcher :ignore_key? , <<-PATTERN
1715 (pair (sym {
@@ -101,7 +99,7 @@ def on_send(node)
10199 if option_pairs
102100 locals = option_pairs . map { |pair | locals_key? ( pair ) } . compact . first
103101 if locals && ( !locals . hash_type? || !hash_with_literal_keys? ( locals ) )
104- add_offense ( node , message : LOCALS_MSG )
102+ add_offense ( node )
105103 end
106104 end
107105 end
You can’t perform that action at this time.
0 commit comments