Skip to content

Commit

Permalink
DEV: Fix deprecations for Rails 7.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
Flink committed Nov 7, 2024
1 parent 19f9c6c commit aebf68f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/webinar.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

class Webinar < ActiveRecord::Base
enum approval_type: { automatic: 0, manual: 1, no_registration: 2 }
enum status: { pending: 0, started: 1, ended: 2 }
enum :approval_type, { automatic: 0, manual: 1, no_registration: 2 }
enum :status, { pending: 0, started: 1, ended: 2 }

has_many :webinar_users
has_many :users, through: :webinar_users
Expand Down
2 changes: 1 addition & 1 deletion app/models/webinar_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
class WebinarUser < ActiveRecord::Base
self.inheritance_column = :_type_disabled

enum type: { attendee: 0, panelist: 1, host: 2 }
enum :type, { attendee: 0, panelist: 1, host: 2 }

validates :type, presence: true, inclusion: { in: types.keys }
validates :webinar_id, presence: true
Expand Down

0 comments on commit aebf68f

Please sign in to comment.