文字列の改行コードを タグに置換したい!とかよくある事だったので、毎回helperに#brとかメソッドを定義していたけど、simple_formatというヘルパが既に定義されていた。 my_text = "Here is some basic text...\n...with a line break." simple_format(my_text) # => "<p>Here is some basic text...\n<br />...with a line break.</p>" simple_format(my_text, {}, wrapper_tag: "div") # => "<div>Here is some basic text...\n<br />...with a line break.</div>" more_text = "We want to put a pa