2018-10-24から1日間の記事一覧

Rails でフォームを submit したときに URL に付与される commit=hogehoge を除外する

状況 フォームを submit した先の URL が例えば以下のようになった場合に、commit=hogehoge の部分を除外したい。 http://localhost:3000/pages/search?search_query=abcdefg&commit=hogehoge 結論 submit メソッドのオプションに name: nil を指定する。 Sl…

Rails の form_with で「utf8=✓」を消す

結論 form_with のオプションに skip_enforcing_utf8: true を指定する。 Slim での例 = form_with url: 'foobar', skip_enforcing_utf8: true do |f|

Powered by はてなブログ