Created
April 26, 2022 21:54
-
-
Save adrianvalenz/626171c26e20df7bab1688228e0c3f07 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Conversation < ActiveRecord::Base | |
enum status: [:active, :archived], _suffix: true | |
enum comments_status: [:active, :inactive], _prefix: :comments | |
end | |
conversation.active_status! | |
conversation.archived_status? # => false | |
conversation.comments_inactive! | |
conversation.comments_active? # => false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment