A corporation manager and dashboard for EVE Online
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 9 година
12345678910111213
  1. class AdminSetting < ActiveRecord::Base
  2. def self.get(key)
  3. Rails.cache.fetch("admin_setting/#{key}") do
  4. self.find_by(key: key).value
  5. end
  6. end
  7. def self.set(key, value)
  8. self.find_by(key: key).update(value: value)
  9. Rails.cache.write("admin_setting/#{key}", value)
  10. end
  11. end