ar-settings

Simplified, permanent key-value store for global application settings.


Keywords
activerecord, configuration, ruby-gem, ruby-on-rails, settings-storage
License
MIT
Install
gem install ar-settings -v 0.2.0

Documentation

Application Settings for Ruby on Rails built on Active Record

Gem Version Build Status Maintainability

Simplified, permanent key-value store for global application settings.

Getting Started

Add following to Gemfile:

gem 'ar-settings', require: 'settings'

then bundle install

Run generator to add migration:

$ rails generate install_settings

Usage

Gem implements minimal amount of public methods needed to manage settings:

Settings.set(:key, 'value')
Settings.get(:key)

Settings.has(:key)
Settings.unset(:key)

To do

  1. Allow mass assignments
  2. Utilize Rails.cache to reduce overhead of querying db

Licence

Licensed under the MIT license.