enhancement: Detect polymorphic associations in generator #3875
Annotations
2 errors
standardrb:
lib/generators/avo/resource_generator.rb#L181
[rubocop] reported by reviewdog 🐶
[Corrected] Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Raw Output:
lib/generators/avo/resource_generator.rb:181:94: C: [Corrected] Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
polymorphic_fields = model_db_columns.keys.group_by { |col| col.gsub(/_type|_id$/, '') }
^^
|
standardrb:
lib/generators/avo/resource_generator.rb#L182
[rubocop] reported by reviewdog 🐶
[Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 37) spaces for indenting an expression in an assignment spanning multiple lines.
Raw Output:
lib/generators/avo/resource_generator.rb:182:48: C: [Corrected] Layout/MultilineMethodCallIndentation: Use 2 (not 37) spaces for indenting an expression in an assignment spanning multiple lines.
.select { |_field, group| group.size == 2 }
^^^^^^^
|
Loading