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

Add section for hash syntax of enums #255

Merged
merged 1 commit into from
Jul 17, 2019
Merged

Conversation

tejasbubane
Copy link
Contributor

Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

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

Looks good!

README.adoc Outdated
@@ -385,6 +385,24 @@ class Transaction < ActiveRecord::Base
end
----

=== Enums [[enums]]

Prefer hash syntax over arrays for `enums`.
Copy link
Member

Choose a reason for hiding this comment

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

WDYT of

`enum`s

or
Prefer using the hash syntax for enum.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to Prefer using the hash syntax for enum.

README.adoc Show resolved Hide resolved
README.adoc Outdated Show resolved Hide resolved
README.adoc Outdated Show resolved Hide resolved
@@ -385,6 +385,26 @@ class Transaction < ActiveRecord::Base
end
----

=== Enums [[enums]]
Copy link
Member

Choose a reason for hiding this comment

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

I investigated whether === Enums or === Enum would be better. The API says Enum, but the guide says Enums, so I think that Enums would be fine.

@koic koic merged commit 00de81b into rubocop:master Jul 17, 2019
@tejasbubane tejasbubane deleted the enums branch July 17, 2019 17:00
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.

Thoughts on ActiveRecord enum
3 participants