instance method
replace
Ruby on Rails 6.1.7.10
Since v6.0.6Signature
replace(selector)
No documentation comment.
Parameters
-
selectorreq
Source
# File actiontext/lib/action_text/fragment.rb, line 37
def replace(selector)
update do |source|
source.css(selector).each do |node|
node.replace(yield(node).to_s)
end
end
end
Defined in actiontext/lib/action_text/fragment.rb line 37
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::Fragment