Class: CustomText

Inherits:
ApplicationRecord show all
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.

See Also:

  • ApplicationHelper::custom_text

Instance Method Summary collapse

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

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

#nameObject


14
15
16
# File 'app/models/custom_text.rb', line 14

def name
  "#{identifier}-#{differential}"
end