Sha256: ce371f5a18d62f53a150fed707599b3d0d2051a424600c5f45c6d423819fef03

Contents?: true

Size: 843 Bytes

Versions: 5

Compression:

Stored size: 843 Bytes

Contents

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

class AddNotificationEventCard < Cardio::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

5 entries across 5 versions & 1 rubygems

Version Path
card-1.101.4 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.101.3 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.101.2 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.101.1 db/migrate_core_cards/20170314175313_add_notification_event_card.rb
card-1.101.0 db/migrate_core_cards/20170314175313_add_notification_event_card.rb