app/models/signum/signal.rb in signum-0.7.2 vs app/models/signum/signal.rb in signum-0.7.4
- old
+ new
@@ -11,14 +11,14 @@
after_update_commit :broadcast_update
def broadcast_create
broadcast! if can_broadcast?
- broadcast_prepend_to(:signals, target: Signum.config.balloon_notifications_container_id.call(key || signalable, id),
+ broadcast_prepend_to(:signals, target: Signum.config.balloon_notifications_container_id.call(key || signalable),
html: ApplicationController.render(Signum::Notification::Component.new(self)))
- broadcast_prepend_to(:signals, target: Signum.config.drawer_notifications_container_id.call(key || signalable, id),
+ broadcast_prepend_to(:signals, target: Signum.config.drawer_notifications_container_id.call(key || signalable),
html: ApplicationController.render(Signum::NotificationDrawerItem::Component.new(signal: self)))
end
def broadcast_update
return if saved_change_to_state? && (broadcasted? || shown?)
@@ -26,12 +26,12 @@
if saved_change_to_state? && closed?
broadcast_remove_to(:signals, target: "notification_drawer_item_parent_#{signalable_id}_#{id}")
return
end
- broadcast_replace_to(:signals, target: Signum.config.balloon_notifications_container_id.call(key || signalable, id),
+ broadcast_replace_to(:signals, target: Signum.config.notification_body_id.call(:balloon, self),
html: ApplicationController.render(Signum::NotificationBody::Component.new(self, {type: :balloon, timeout: 5})))
- broadcast_replace_to(:signals, target: Signum.config.drawer_notifications_container_id.call(key || signalable, id),
+ broadcast_replace_to(:signals, target: Signum.config.notification_body_id.call(:drawer_item, self),
html: ApplicationController.render(Signum::NotificationBody::Component.new(self, {type: :drawer_item, timeout: 5})))
end
validates :text, presence: true