lib/notification_settings/subscriber.rb in notification-settings-1.2.1 vs lib/notification_settings/subscriber.rb in notification-settings-1.2.2

- old
+ new

@@ -12,10 +12,11 @@ include NotificationSettings::Subscriber::InstanceMethods end module InstanceMethods - def subscribe options = {} + def subscribe subscribable, options = {} + 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