Skip to content

Commit c222756

Browse files
committed
[Fix rubocop#1353] Fix incorrect escaping of asterisk in docs and comments
1 parent 8056bdc commit c222756

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/rubocop/cop/rails/arel_star.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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
#

0 commit comments

Comments
 (0)