Ruby

Ruby

Made by DeepSource

Usage of "*" on Arel::Table column reference RB-W1018

Bug risk
Major

Avoid using "*" on an Arel::Table column reference.

Using arel_table["*"] causes the outputted string to be a literal quoted asterisk (e.g. my_model.*). This causes the database to look for a column named * (or "*") as opposed to expanding the column list as one would likely expect.

Bad practice

MyTable.arel_table["*"]

Recommended

MyTable.arel_table[Arel.star]