Rails で markdown
require 'bluecloth'
してる環境であれば View の Helper (TextHelper内)で markdown() が定義されているのでそれを使える.
まぁ,View以外なら,そのまま Bluecloth.new(text).to_html
でも大した問題ではないんだけど,Viewで使うならやはり <%= markdown(text) %>
だよなぁ.
require 'bluecloth'
してる環境であれば View の Helper (TextHelper内)で markdown() が定義されているのでそれを使える.
まぁ,View以外なら,そのまま Bluecloth.new(text).to_html
でも大した問題ではないんだけど,Viewで使うならやはり <%= markdown(text) %>
だよなぁ.