We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 49ad209 + 51026ae commit 9d04f7fCopy full SHA for 9d04f7f
app/models/identity.rb
@@ -1,6 +1,8 @@
1
class Identity < ApplicationRecord
2
PROVIDER_NAMES = {'github' => 'GitHub', 'twitter' => 'Twitter'}.freeze
3
4
+ enum :provider, {github: 'github', twitter: 'twitter'}, scopes: false, instance_methods: false
5
+
6
belongs_to :user
7
8
validates :provider, presence: true
0 commit comments