次のようにhtmlマークアップを返すRuby gemを作成しようとしています:
class Hola
def self.hi(name = "world")
"hello #{name}"
end
def self.hi_with_markup(name = "world")
"<strong>hello #{name}</strong>"
end
end
ただし、次のように test.html.erb ファイルで使用しようとするたびに:
<%= Hola.hi_with_markup(", please work!") %>
実際に html をレンダリングする代わりに、タグを印刷した文字列を返します。gem 側からこれを修正するにはどうすればよいですか?
ありがとう!