Skip to Content Skip to Search

module ActionText::Serialization

Public instance methods

Source code GitHub
# File actiontext/lib/action_text/serialization.rb, line 34
def _dump(*)
  self.class.dump(self)
end
Source code GitHub
# File actiontext/lib/action_text/serialization.rb, line 14
def dump(content)
  case content
  when nil
    nil
  when self
    content.to_html
  when ActionText::RichText
    content.body.to_html
  else
    new(content).to_html
  end
end
Source code GitHub
# File actiontext/lib/action_text/serialization.rb, line 10
def load(content)
  new(content) if content
end

Definition files