Class: Country
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Country
- Includes:
- MasterModel
- Defined in:
- app/models/country.rb,
app/models2/country.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.all_cache ⇒ Object
20 21 22 |
# File 'app/models/country.rb', line 20 def self.all_cache Rails.cache.fetch('country_all'){Country.all.to_a} end |
Instance Method Details
#clear_all_cache ⇒ Object
24 25 26 |
# File 'app/models/country.rb', line 24 def clear_all_cache Rails.cache.delete('country_all') end |