You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to utilize the power of rails_config to extend the storage of the key / value pairs in ActiveRecord databases. Is this possible with the existing code? Maybe if someone points me in the direction of where to add this functionality I may be able to extend this gem further with ActiveRecord support.
If I was to create a model with the same name of Settings, is it possible to default to ActiveRecord with the YAML files as fallback?
The text was updated successfully, but these errors were encountered:
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.
I'd like to utilize the power of rails_config to extend the storage of the key / value pairs in ActiveRecord databases. Is this possible with the existing code? Maybe if someone points me in the direction of where to add this functionality I may be able to extend this gem further with ActiveRecord support.
If I was to create a model with the same name of Settings, is it possible to default to ActiveRecord with the YAML files as fallback?
The text was updated successfully, but these errors were encountered: