diff --git a/db/schema.rb b/db/schema.rb index 5b3cd143..c8e9c41e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -66,18 +66,6 @@ ActiveRecord::Schema.define(version: 20140521142651) do add_index "assignments", ["user_id", "task_id"], name: "index_assignments_on_user_id_and_task_id", unique: true, using: :btree - create_table "configurable_settings", force: true do |t| - t.integer "configurable_id" - t.string "configurable_type" - t.integer "targetable_id" - t.string "targetable_type" - t.string "name", default: "", null: false - t.string "value_type" - t.text "value" - end - - add_index "configurable_settings", ["name"], name: "index_configurable_settings_on_name", using: :btree - create_table "deliveries", force: true do |t| t.integer "supplier_id" t.date "delivered_on" diff --git a/lib/foodsoft_config.rb b/lib/foodsoft_config.rb index 69644705..a90004e8 100644 --- a/lib/foodsoft_config.rb +++ b/lib/foodsoft_config.rb @@ -26,7 +26,7 @@ class FoodsoftConfig # Provides a nice accessor for config values # FoodsoftConfig[:name] # => 'FC Test' def [](key) - config[key] + RailsSettings::CachedSettings["foodcoop.#{self.scope}.#{key}"] || config[key] end # Loop through each foodcoop and executes the given block after setup config and database