0
0
Fork 0

Migrate from ledermann/rails-settings to rails-settings-cached which allows global settings

with YAML-defined defaults. Add admin page for editing global settings. Add "site_description"
setting that would show as a paragraph on the frontpage
This commit is contained in:
Eugen Rochko 2017-01-12 20:46:24 +01:00
parent babc6a1528
commit b11fdc3ae3
20 changed files with 188 additions and 34 deletions

10
app/lib/hash_object.rb Normal file
View file

@ -0,0 +1,10 @@
# frozen_string_literal: true
class HashObject
def initialize(hash)
hash.each do |k, v|
instance_variable_set("@#{k}", v)
self.class.send(:define_method, k, proc { instance_variable_get("@#{k}") })
end
end
end