Comments (1)
One possible approach would be to create a table which contains two fields :name and :value the value field would be serialized.
This way you can theoretically load and merge the settings from the database just like you would from any yaml file but you could also write them back to the database.
The Settings class would have to keep track of which values came from where and write them only if they came from the database.
Another would be to use a hyrbrid approach fat_free_crm does this. Take a look at their settings model.
from config.
Related Issues (20)
- Quoted numeric values should be returned as strings, not parsed into numbers HOT 6
- Ways to reload config of a running process? HOT 1
- Is it possible to reference another configuration in a YAML file? HOT 2
- Unexpected formatting of ENV variable values HOT 6
- Pioneer's question HOT 1
- Preserve newlines while using embedded Ruby HOT 2
- Error using Ruby 3.1.0 : Psych::DisallowedClass: Tried to load unspecified class: Time HOT 2
- avoid Hash monkey patch when loading DeepMerge HOT 2
- Hash sources get clobbered in `Settings.reload!` HOT 1
- ENV variables not loaded with config HOT 12
- Compability with Rails engine HOT 3
- Feature Request: Rake Task to generate env-file HOT 1
- Help with beef please HOT 1
- Released Version 4.1.0 still uses removed method `File.exists?` HOT 7
- minimum, maximum keys are conflicted with active_support methods. HOT 8
- Extend Rails integration to application HOT 3
- Environment variables not loaded anymore after upgrading to Rails 6.1.7.3 HOT 2
- How to use/mock in rspec? HOT 3
- Allow to use custom filename && directory name to store configs HOT 2
- Converting to hash is creating an error (Ruby 3.2.2, config 5.0, Rails 6.1) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from config.