Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Arel helper methods to generate arel #22581

Merged
merged 5 commits into from
Aug 10, 2023
Merged

Conversation

kbrock
Copy link
Member

@kbrock kbrock commented Jun 24, 2023

Arel provides factory methods to generate common SQL functions

This uses those functions

WIP: I need to ensure that each of these entries are actually being tests. A Quick pass found the coverage pretty high, but I want to do a better job before saying "good"

rubocop requested this:

> Wrap expressions with varying precedence with parentheses to avoid ambiguity.
@kbrock
Copy link
Member Author

kbrock commented Jul 15, 2023

update:

  • removed methods that generated sql that were only used once
  • fixed cop to put parens around a multiplication to make easier to understand

UN-WIP: all virtual attributes had tests.
The only method that was hard to determine test coverage was regional_tenants.
This is tied into Rbac, so should be all set.

@kbrock kbrock removed the wip label Jul 15, 2023
@kbrock kbrock changed the title [WIP] use Arel helper methods to generate arel Use Arel helper methods to generate arel Jul 15, 2023
@miq-bot
Copy link
Member

miq-bot commented Jul 15, 2023

Checked commits kbrock/manageiq@b3fe70b~...e6b721d with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
8 files checked, 0 offenses detected
Everything looks fine. 🍪

@Fryguy Fryguy self-assigned this Jul 19, 2023
@Fryguy Fryguy merged commit 0573ff7 into ManageIQ:master Aug 10, 2023
@kbrock kbrock deleted the arel_coalesce branch August 11, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants