Class: CustomText
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- CustomText
- Defined in:
- app/models/custom_text.rb
Overview
Used in a handful of places to provide dynamically customizable text in the web interface, such as setting the banner at the top of the page.
Instance Method Summary collapse
-
#clear_text_cache! ⇒ Object
If the value of this CustomText instance was saved in cache e.g.
- #name ⇒ Object
Methods inherited from ApplicationRecord
alias_association, convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!
Methods included from Squishify
Instance Method Details
#clear_text_cache! ⇒ Object
If the value of this CustomText instance was saved in cache e.g. the appication wide information box, delete it.
10 11 12 |
# File 'app/models/custom_text.rb', line 10 def clear_text_cache! Rails.cache.delete(name) end |
#name ⇒ Object
14 15 16 |
# File 'app/models/custom_text.rb', line 14 def name "#{identifier}-#{differential}" end |