Class: Maglev::SettingTypes::Text

Inherits:
Base
  • Object
show all
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 (value)
  return nil if value.blank?

  Nokogiri::HTML(value.gsub(%r{<br/?>}, ' ')).text.strip
end