forked from rubocop/rubocop-rails
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve multiline semantics on
Rails/Presence
Similar issue: rubocop/rubocop#10784 Before ```diff if a.present? +^^^^^^^^^^^^^ Use `a.presence || b.to_f * 12.0` instead of `if a.present? + a +else + b +end`. a else b end ``` After ```diff if a.present? +^^^^^^^^^^^^^ Use `a.presence || b` instead of `if a.present? ... end`. a else b end ```
- Loading branch information
Showing
3 changed files
with
288 additions
and
104 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
changelog/change_preserve_multiline_semantics_on_rails_presence.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#817](https://github.com/rubocop/rubocop-rails/pull/817): Preserve multiline semantics on `Rails/Presence`. ([@ydah][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.