BananaCrystal / email-templates

This repository contains in-house email templates that serve as structure for our emails. Each template can be updated and modified to fit requirements.
MIT License
0 stars 0 forks source link

buy_crypto.rb #6

Open geekelo opened 1 month ago

geekelo commented 1 month ago

FILE

ActiveAdmin.register_page 'Buy Crypto' do
  menu parent: 'Legacy', label: 'Buy Crypto'

  content do
    h2 'Crypto purchased via Credit Card and Apple Pay'

    para do
      h3 'Send Wyre Partner Stats'
      span 'Note: Stats are only available in production. '
      span "Use password: #{ENV.fetch('WYRE_BUY_CRYPTO_STATS_PASSWORD')}" if Rails.env.production?
    end

    # renders app/views/admin/posts/_some_partial.html.erb
    render 'wyre_dashboard' if Rails.env.production?
    para 'Note: These stats only available in production' if Rails.env.production?
  end
end
geekelo commented 1 month ago

This code defines a custom page in the ActiveAdmin interface for viewing statistics related to purchasing cryptocurrency using credit cards and Apple Pay. Here’s an explanation of what this file does:

File: buy_crypto.rb

1. ActiveAdmin.register_page 'Buy Crypto' do

2. menu parent: 'Legacy', label: 'Buy Crypto'

3. content do ... end

Summary:

The custom page approach in ActiveAdmin is flexible and allows you to add any content or functionality to the admin interface that isn’t directly tied to a single model.