lib/notification_settings/subscriber.rb in notification-settings-1.2.2 vs lib/notification_settings/subscriber.rb in notification-settings-1.2.3
- old
+ new
@@ -18,10 +18,10 @@
options[:subscribable] = subscribable
self.notification_subscriptions.create options
end
def unsubscribe subscribable
- subscription = self.notification_subscriptions.find_by subscribable_id: subscribable.id, subscribable_type: subscribable.class.to_s
+ subscription = self.notification_subscriptions.find_by subscribable_id: subscribable.id, subscribable_type: subscribable.class.name
subscription.destroy
end
end