Sha256: 51aeb9cc88db49c352dc55bfd6639b6412dc2963abf84fe66e83a26404bf9aeb

Contents?: true

Size: 895 Bytes

Versions: 17

Compression:

Stored size: 895 Bytes

Contents

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

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

17 entries across 17 versions & 1 rubygems

Version Path
card-1.104.2 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.104.1 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.104.0 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.103.4 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.103.3 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.103.2 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.103.1 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.103.0 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.7 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.102.0 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.6 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.5 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.4 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.3 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.2 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.1 db/migrate_core_cards/20150528084659_add_session_cardtype.rb
card-1.101.0 db/migrate_core_cards/20150528084659_add_session_cardtype.rb