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

Fix an incorrect autocorrect for Rails/Presence when a right-hand side of the relational operator #816

Merged
merged 1 commit into from
Oct 20, 2022

Commits on Oct 20, 2022

  1. Fix an incorrect autocorrect for Rails/Presence when a right-hand s…

    …ide of the relational operator
    
    This PR fixes an incorrect autocorrect when there is right-hand side of the relational operator as follows:
    ```ruby
    a < if b.present?
      b
    else
      c
    end
    ```
    
    Expect autocorrect
    ```ruby
    a < (b.presence || c)
    ```
    
    Actual autocorrect
    ```ruby
    a < b.presence || c
    ```
    ydah committed Oct 20, 2022
    Configuration menu
    Copy the full SHA
    4b6362e View commit details
    Browse the repository at this point in the history