Skip to content

Commit

Permalink
Fix scope overriding private AR method
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergeykot committed May 18, 2018
1 parent 3bb0ca6 commit 1798073
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/subscription.rb
@@ -1,6 +1,7 @@
class Subscription < ApplicationRecord

enum kind: { test: 'test', full: 'full', evaluation: 'evaluation', oem: 'oem', provisional: 'provisional', internal: 'internal' }
# we avoid to name enum key 'test' because it will override existing private method
enum kind: { is_test: 'test', full: 'full', evaluation: 'evaluation', oem: 'oem', provisional: 'provisional', internal: 'internal' }
enum status: { expired: 'EXPIRED', active: 'ACTIVE', notactivated: 'NOTACTIVATED' }

validates :regcode, presence: true
Expand Down

0 comments on commit 1798073

Please sign in to comment.