method

replace

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: Fragment
replace(selector) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actiontext/lib/action_text/fragment.rb, line 37
    def replace(selector)
      update do |source|
        source.css(selector).each do |node|
          replacement_node = yield(node)
          node.replace(replacement_node.to_s) if node != replacement_node
        end
      end
    end
Register or log in to add new notes.