InstantRailsでtextilize使うなら
gem install redcloth
が必要なようね。。。
でくくられたくないときは
<% textilize_without_paragraph @sometext %>
みたいなのでよいようだ
調べてみたらactionpack(versionの指定もいるのかな)の下の
lib/action_view/helpers/text_helper.rb
というファイルなようだったので
def textilize(text) if text.blank? "" else textilized = RedCloth.new(text, [ :hard_breaks ]) textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=") textilized.to_html end end # Returns the text with all the Textile codes turned into HTML-tags, but without the regular bounding <p> tag. # <i>This method is only available if RedCloth can be required</i>. def textilize_without_paragraph(text) textiled = textilize(text) if textiled[0..2] == "<p>" then textiled = textiled[3..-1] end if textiled[-4..-1] == "</p>" then textiled = textiled[0..-5] end return textiled end
こういう実装だった