Skip to content

UI for modifying Rails settings implemented via rails-settings-cached

License

Notifications You must be signed in to change notification settings

ev-sc/rails-settings-cached-ui

Repository files navigation

SettingsUI

This gem is a work in progress, but aims to be a generic UI for modifying settings for Rails applications on the fly, using rails-settings-cached.

Requirements

The parent Rails app needs to have a working installation of rails/webpacker.

Installation

Add this line to your application's Gemfile:

gem 'settings_ui', git: 'https://github.com/lowlandjuju/settings_ui'

And then execute:

$ bundle

Create the engine initializer:

$ rails g settings_ui:install

After the installation is done, edit the created config/initializers/settings_ui.rb initializer file and modify MODEL_NAME and SCHEMA.

Add the following to your config/routes.rb file:

mount SettingsUi::Engine, at: '/settings_ui', constraints: lambda { |request|
  CONSTRAINT_METHOD?(request)
}

Or whatever route you want to mount the UI at. Where CONSTRAINT_METHOD is whatever you want to use to restrict access to the settings UI.

Contributing

TODO: Contribution directions go here.

License

The gem is available as open source under the terms of the MIT License.

About

UI for modifying Rails settings implemented via rails-settings-cached

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published