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:
parent
babc6a1528
commit
b11fdc3ae3
20 changed files with 188 additions and 34 deletions
10
app/lib/hash_object.rb
Normal file
10
app/lib/hash_object.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue