Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configuration in database #1

Open
nil0bject opened this issue Nov 23, 2017 · 1 comment
Open

configuration in database #1

nil0bject opened this issue Nov 23, 2017 · 1 comment

Comments

@nil0bject
Copy link

allow configuration/features to be stored in a db table and applied without server restart

@freibuis
Copy link
Owner

🤔 let me think about it.... this should be simple... could this be done and keep it simple?
if so... how would we work it with rails and non rails apps..... as it is supposed to be simple.

should I try some logic like

rough idea

if simple_storage == :db
  if defined? Rails
    #  Active::record lookup
  else 
    # custom database lookup (or redis style key/pair systems)
  end
end

config file changed to:

environment:
  production:
    storage: db #
    storage_table_name: simple_storage 
  development:
    storage: file # 
    features:
      feature_one: true
      feature_two: false

with the table that would store the values in .. I would think creating another gem called simple_storage that would only hold id: key: pair: simple_storage_type example *maybe I should call it simple_configs :) keeping with the naming convention ;)

{
  id: 1 , 
  key: 'feature_one', 
  value: true, 
  simple_storage_type: :simple_features 
}

really open to this idea.. would love opinions how to approach this and keep it simple from the user perspective. (Simple usage as possible with

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants