Sha256: 0419718ebd1f8cd134298863fdc22b4774224aa254958378cbe2c0ba40758262

Contents?: true

Size: 451 Bytes

Versions: 2

Compression:

Stored size: 451 Bytes

Contents

module NotificationHandler
    module NotificationScopes

        extend ActiveSupport::Concern

        included do
            scope :read, -> { where(read: true) }
            scope :unread, -> { where(read: false) }

            include NotificationRenderer::NotificationScopes if defined?(NotificationRenderer)
            include NotificationSettings::NotificationScopes if defined?(NotificationSettings)
        end

    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
notification-handler-1.0.0.beta10 lib/notification_handler/notification_scopes.rb
notification-handler-1.0.0.beta9 lib/notification_handler/notification_scopes.rb