File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ module Cop
55 module Rails
66 # Prevents usage of `"*"` on an Arel::Table column reference.
77 #
8- # Using `arel_table["*"]` causes the outputted string to be a literal
9- # quoted asterisk (e.g. <tt> `my_model`.`*`</tt> ). This causes the
10- # database to look for a column named <tt>`*`</tt> (or `"*"`) as opposed
8+ # Using `arel_table["\ *"]` causes the outputted string to be a literal
9+ # quoted asterisk (e.g. `my_model`.`*`). This causes the
10+ # database to look for a column named `\*` (or `"*"`) as opposed
1111 # to expanding the column list as one would likely expect.
1212 #
1313 # @safety
14- # This cop's autocorrection is unsafe because it turns a quoted `*` into
15- # an SQL `*`, unquoted. `*` is a valid column name in certain databases
14+ # This cop's autocorrection is unsafe because it turns a quoted `\ *` into
15+ # an SQL `*`, unquoted. `\ *` is a valid column name in certain databases
1616 # supported by Rails, and even though it is usually a mistake,
1717 # it might denote legitimate access to a column named `*`.
1818 #
You can’t perform that action at this time.
0 commit comments