Class: Maglev::SettingTypes::Text
- Inherits:
-
Base
- Object
- Base
- Maglev::SettingTypes::Text
- Defined in:
- app/models/maglev/setting_types/text.rb
Overview
rubocop:disable Style/ClassAndModuleChildren
Instance Method Summary collapse
Instance Method Details
#content_label(value) ⇒ Object
5 6 7 8 9 |
# File 'app/models/maglev/setting_types/text.rb', line 5 def content_label(value) return nil if value.blank? Nokogiri::HTML(value.gsub(%r{<br/?>}, ' ')).text.strip end |