Sha256: 7a5e07eb667372aecdcd20f0897a9c1d3ce9cc24f5dea3caa4afd183f8b89662

Contents?: true

Size: 382 Bytes

Versions: 2

Compression:

Stored size: 382 Bytes

Contents

# frozen_string_literal: true

require 'active_model'

module NotificationSettings
  class DeliveryMethodPreferencesForm
    include ActiveModel::Model

    attribute :enabled, :boolean, default: true
    NotificationPusher.configuration.delivery_methods
                      .each do |delivery_method, _|
      attribute delivery_method, :boolean, default: true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
notification-settings-3.0.2 lib/notification_settings/delivery_method_preferences_form.rb
notification-settings-2.0.0 lib/notification_settings/delivery_method_preferences_form.rb