Sha256: 9f06a17ecd4b6adc0f8a8d6426eceb155a7578bfd94a593d9910cb1ec5e634bb

Contents?: true

Size: 841 Bytes

Versions: 20

Compression:

Stored size: 841 Bytes

Contents

# -*- encoding : utf-8 -*-

class AddNotificationEventCard < Card::Migration::Core
  def up
    ensure_card "Notification template", codename: "notification_template",
                type_id: Card::CardtypeID
    ensure_trait "*message", "message", default: { type_id: Card::PhraseID }
    ensure_trait "*disappear", "disappear", default: { type_id: Card::ToggleID }
    ensure_trait "*contextual class", "contextual_class",
                 default: { type_id: Card::PointerID },
                 input: "radio",
                 options: { type_id: Card::PointerID,
                            content: %w(success info warning danger) }

    [:create, :update, :delete].each do |action|
      update ["on_#{action}".to_sym, :right, :help],
             content: "Configure events to be executed when card id #{action}d"
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
card-1.100.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.99.6 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.99.5 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.99.4 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.99.3 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.99.2 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.99.1 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.99.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.98.3 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.98.2 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.98.1 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.98.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.97.0.1 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.97.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.96.8 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.96.7 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.96.6 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.96.5 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.96.4 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.96.3 db/migrate_core_cards/20170314175313_add_notification_event_card.rb