Sha256: bf45cc854cfd737bfe6865a99dea41d5d09e3ace10f0081091c12a955956aa57

Contents?: true

Size: 1.52 KB

Versions: 7

Compression:

Stored size: 1.52 KB

Contents

# frozen_string_literal: true

DemoMode.add_persona do
  # See README at https://github.com/Betterment/demo_mode

  sign_in_as do
    # Construct your user here. For example:
    # FactoryBot.create(:user)
  end

  # Features that make this persona unique:
  features << 'a sample persona! find me at:'
  features << 'config/personas/sample_persona.rb'

  # "Callout" personas render at the top, above the table:
  callout true

  # Use the `icon` config to change the persona's icon.
  #
  # Built-in icons include `:user` (default), `:users`, and `:tophat`:
  # ==========
  # icon :user
  #
  # Specify a string to use an asset in the asset pipeline:
  # =======================================================
  # icon 'path/to/my/icon.png'
  #
  # Specify a block to render your own icon:
  # ========================================
  # icon do
  #   # Any view helpers are available in this context.
  #   image_tag('images/dancing-penguin.gif')
  # end

  # Define "variants" with the `variant` keyword:
  # =============================================
  # variant 'pending invite' do
  #   sign_in_as do
  #     FactoryBot.create(:user, :pending_invite)
  #   end
  # end

  # Display the login credentials before signing in:
  # ================================================
  # display_credentials

  # To do something other than "sign in"
  # (e.g. redirect to an exclusive sign up link)
  # ============================================
  # begin_demo do
  #   redirect_to sign_up_path(invite: @session.signinable.invite_token)
  # end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
demo_mode-1.5.0 lib/generators/templates/sample_persona.rb
demo_mode-1.4.1 lib/generators/templates/sample_persona.rb
demo_mode-1.4.0 lib/generators/templates/sample_persona.rb
demo_mode-1.3.0 lib/generators/templates/sample_persona.rb
demo_mode-1.2.3 lib/generators/templates/sample_persona.rb
demo_mode-1.2.2 lib/generators/templates/sample_persona.rb
demo_mode-1.2.1 lib/generators/templates/sample_persona.rb