class method
self.new
Ruby on Rails 8.0.4
Since v6.0.6Signature
self.new(content = nil, options = {})
No documentation comment.
Parameters
-
contentopt = nil -
optionsopt = {}
Source
# File actiontext/lib/action_text/content.rb, line 40
def initialize(content = nil, options = {})
options.with_defaults! canonicalize: true
if options[:canonicalize]
@fragment = self.class.fragment_by_canonicalizing_content(content)
else
@fragment = ActionText::Fragment.wrap(content)
end
end
Defined in actiontext/lib/action_text/content.rb line 40
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::Content