Sha256: 8d309b133c3b79e3176dfe940cd443ceb2cefbf15ab2ee04e2fd16a50d42d467

Contents?: true

Size: 893 Bytes

Versions: 60

Compression:

Stored size: 893 Bytes

Contents

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

class AddSessionCardtype < Card::Migration::Core
  def up
    session_card_name = Card.exists?("Session") ? "BrowserSession" : "Session"
    Card.create! name: session_card_name, type_code: :cardtype,
                 codename: "session",
                 subcards: { "+description" => { content: 'Session cards are for non-permanent content.
                  They are not stored in the database and can have different values for different users.
                  You can use a Session card to keep track of certain state of a particular user like the content
                  of shopping basket.' } }
    Card::Cache.reset_all
    Card.create! name: "*edit toolbar pinned", type_code: :session,
                 codename: "edit_toolbar_pinned"
    Card.create! name: "*toolbar pinned", type_code: :session,
                 codename: "toolbar_pinned"
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

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