Sha256: 9d4cdde2eff7f0cb25f1cd5b44e7481e5b9f06aa81c21626740becf982a53409

Contents?: true

Size: 479 Bytes

Versions: 11

Compression:

Stored size: 479 Bytes

Contents

require 'active_support'

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

11 entries across 11 versions & 1 rubygems

Version Path
notification-handler-1.2.5 lib/notification_handler/notification_scopes.rb
notification-handler-1.2.4 lib/notification_handler/notification_scopes.rb
notification-handler-1.2.3 lib/notification_handler/notification_scopes.rb
notification-handler-1.2.2 lib/notification_handler/notification_scopes.rb
notification-handler-1.2.1 lib/notification_handler/notification_scopes.rb
notification-handler-1.2.0 lib/notification_handler/notification_scopes.rb
notification-handler-1.1.2 lib/notification_handler/notification_scopes.rb
notification-handler-1.1.1 lib/notification_handler/notification_scopes.rb
notification-handler-1.1.0 lib/notification_handler/notification_scopes.rb
notification-handler-1.0.0 lib/notification_handler/notification_scopes.rb
notification-handler-1.0.0.beta11 lib/notification_handler/notification_scopes.rb