【问题标题】:How to remove “utf8=✓” when using form_with?使用form_with时如何去掉“utf8=✓”?
【发布时间】:2018-10-02 08:36:03
【问题描述】:

在使用form_with 时,Rails 会自动将 UTF-8 参数添加到表单中。如何删除它?

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-5


    【解决方案1】:

    :skip_enforcing_utf8 选项设置为true。例如:

    <%= form_with(model: @post, url: super_posts_path, skip_enforcing_utf8: true) %>
    

    更多信息可以在here找到。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-22
      • 2020-07-02
      • 2018-11-10
      • 2021-11-10
      • 2015-02-07
      • 2016-06-14
      • 2021-09-24
      • 2019-04-23
      相关资源
      最近更新 更多