Rails4でxmlを出力しようとする場合は、builderを使うのがスタンダードだと思います。builderでHTML文字を出力するとescapseされてしまいます。escapeしないようにする場合に以下のようにします。
app/views/users/index.xml.builder
xml.name do
xml << '<h1>hello world</h1>'
end
More than 5 years have passed since last update.
Rails4でxmlを出力しようとする場合は、builderを使うのがスタンダードだと思います。builderでHTML文字を出力するとescapseされてしまいます。escapeしないようにする場合に以下のようにします。
xml.name do
xml << '<h1>hello world</h1>'
end
Register as a new user and use Qiita more conveniently