Skip to content

Commit

Permalink
Update enum declaration
Browse files Browse the repository at this point in the history
Switch to positional arguments instead of keyword arguments. This fixes
deprecation warning when upgrading to Rails 7.2.
  • Loading branch information
gbp committed Jan 13, 2025
1 parent 6b80efd commit d1e152e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Notification < ApplicationRecord

INSTANTLY = :instantly
DAILY = :daily
enum frequency: [ INSTANTLY, DAILY ]
enum :frequency, [ INSTANTLY, DAILY ]

Check warning on line 25 in app/models/notification.rb

View workflow job for this annotation

GitHub Actions / build

[rubocop] reported by reviewdog 🐶 Do not use space inside array brackets. Raw Output: app/models/notification.rb:25:21: C: Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.

Check warning on line 25 in app/models/notification.rb

View workflow job for this annotation

GitHub Actions / build

[rubocop] reported by reviewdog 🐶 Do not use space inside array brackets. Raw Output: app/models/notification.rb:25:38: C: Layout/SpaceInsideArrayLiteralBrackets: Do not use space inside array brackets.

validates_presence_of :info_request_event, :user, :frequency, :send_after

Expand Down

0 comments on commit d1e152e

Please sign in to comment.