对于rhtml的中文显示问题,ApplicationController类添加
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=utf8"
end
ROR的学习经验
最新推荐文章于 2020-12-10 03:51:43 发布
对于rhtml的中文显示问题,ApplicationController类添加
before_filter :set_charset
def set_charset
@headers["Content-Type"] = "text/html; charset=utf8"
end