Skip to content

Commit

Permalink
Remove redundant double splat
Browse files Browse the repository at this point in the history
ref:

* Add `{ optional: true }` when Rails 5
  - 4459cab
* Add double splat
  - f989d75
* Drop Rails 4.2 Support
  - 181c259
  • Loading branch information
onk committed Feb 11, 2021
1 parent 1b4a90b commit 1714011
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/activity_notification/orm/active_record/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ class Notification < ::ActiveRecord::Base
# Belongs to group instance of this notification as polymorphic association.
# @scope instance
# @return [Object] Group instance of this notification
belongs_to :group, **{ polymorphic: true, optional: true }
belongs_to :group, polymorphic: true, optional: true

# Belongs to group owner notification instance of this notification.
# Only group member instance has :group_owner value.
# Group owner instance has nil as :group_owner association.
# @scope instance
# @return [Notification] Group owner notification instance of this notification
belongs_to :group_owner, **{ class_name: "ActivityNotification::Notification", optional: true }
belongs_to :group_owner, class_name: "ActivityNotification::Notification", optional: true

# Has many group member notification instances of this notification.
# Only group owner instance has :group_members value.
Expand All @@ -42,7 +42,7 @@ class Notification < ::ActiveRecord::Base
# Belongs to :notifier instance of this notification.
# @scope instance
# @return [Object] Notifier instance of this notification
belongs_to :notifier, **{ polymorphic: true, optional: true }
belongs_to :notifier, polymorphic: true, optional: true

# Serialize parameters Hash
serialize :parameters, Hash
Expand Down

0 comments on commit 1714011

Please sign in to comment.