Class: Administrate::Field::RichText
- Defined in:
- lib/administrate/field/rich_text.rb
Instance Attribute Summary
Attributes inherited from Base
#attribute, #data, #options, #page, #resource
Instance Method Summary collapse
Methods inherited from Base
associative?, eager_load?, field_type, html_class, #html_class, #html_controller, #initialize, #name, permitted_attribute, #read_value, #required?, searchable?, #to_partial_path, with_options
Constructor Details
This class inherits a constructor from Administrate::Field::Base
Instance Method Details
#to_s ⇒ Object
6 7 8 |
# File 'lib/administrate/field/rich_text.rb', line 6 def to_s data&.to_plain_text end |
#truncate ⇒ Object
10 11 12 |
# File 'lib/administrate/field/rich_text.rb', line 10 def truncate to_s.truncate(truncation_length) end |