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

Make suit for Ruby3.x and rails6.x, 7.x #97

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

kentarohorie
Copy link

Make suit for Ruby3.x and rails6.x, 7.x.

and this others.

  • Replace travis with github action to run ci
  • Delete files used test EOL version

@@ -20,7 +20,7 @@ class PresenceOfFlagsValidator < EachValidator
def validate_each(record, attribute, value)
value = record.send(:read_attribute_for_validation, attribute)
check_flag(record, attribute)
record.errors.add(attribute, :blank, options) if value.blank? || value == 0
record.errors.add(attribute, :blank, **options) if value.blank? || value == 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/NumericPredicate: Use value.zero? instead of value == 0.
Metrics/LineLength: Line is too long. [87/80]

@pboling
Copy link
Owner

pboling commented Sep 12, 2023

This looks good. I've been planning to release a version 1.0 which would drop support for EOL rubies/rails, so I'll merge this when I prepare for that move soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants