No commit activity in last 3 years
No release in over 3 years
Storage of configuration values in database
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 3.0.0
>= 2.0.0
>= 1.3.1
 Project Readme

Acts as configurable¶ ↑

Provides the capabilities of defining configuration values for a model.

Installation¶ ↑

gem install acts_as_configurable

Initialisation¶ ↑

Migration:

create_table :configurations do |t|
  t.string :name, :value, :null => false
  t.string :configurable_type
  t.integer :configurable_id
end

Configuration model:

class Configuration < ActiveRecord::Base
  belongs_to :configurable, :polymorphic => true
end

Usage¶ ↑

class User < ActiveRecord::Base
 	acts_as_configurable :class_name => 'Configuration'
end

user.configure.name = 'Name'
user.configure.name # => Name