This plugin allows you to create a 'Profile' page with customizable field. For instance you can add a 'Telegram' channel or multiple email addresses or so.
- Add the gem
spina-profile
to yourGemfile
(with thegithub:
orpath:
flag for now). Install the migrations usingrails g spina:profile:install
. - In your Spina theme file under
config/initializers/themes/your_theme.rb
add the following line, with all field you need.
theme.setup_fields = %w(foo bar)
- You can access the created fields using:
Spina::Setup.instance.foo
# => "what ever value foo stores"
This plugin just creates a single instance of the Spina::Setup
model, that dynamically get the configured values added s jsonb
attributes.