Skip to content

Comments

Added documentation for _default option added to ActiveRecord::Enum [ci skip]#39895

Merged
kamipo merged 1 commit intorails:masterfrom
abhaynikam:document_default_enum_option
Jul 22, 2020
Merged

Added documentation for _default option added to ActiveRecord::Enum [ci skip]#39895
kamipo merged 1 commit intorails:masterfrom
abhaynikam:document_default_enum_option

Conversation

@abhaynikam
Copy link
Contributor

The _default option was added in the PR: #39820 but the documentation weren't updated to mention the new change. This PR update the documentation to showcase the _default option addition instead of setting it on the default for enum on the database column.

Question
I am not sure if this is the right place to add the question but here it goes. Why do the options for enum start with an underscore? example: _default, _suffix, _prefix, '_scopes'. Just curious 😄

@kamipo kamipo merged commit 98ddee2 into rails:master Jul 22, 2020
@kamipo
Copy link
Member

kamipo commented Jul 22, 2020

Question
I am not sure if this is the right place to add the question but here it goes. Why do the options for enum start with an underscore? example: _default, _suffix, _prefix, '_scopes'. Just curious 😄

People may have a default column.

@abhaynikam abhaynikam deleted the document_default_enum_option branch July 22, 2020 09:28
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.

2 participants