これには随分手を焼いた。
原因は cotrollerにある
def tour_params
params.require(:tour).permit(
:s_no, :ref_no, :inp_icg, :agt_code, :agt_name, :agt_icg, :arr, :dep,
:night, :flight, :htl_code, :tour, :no_pax,:meal, :pax_type, :rooming, :book_date, :unit_price,
:usd_total, :tts, :jpy_ttl, :net, :received, :invoice_date,:name, :room_type, :remarks, :conf_no,
:look, :jtb_ac, :course_no, :cancel_flag, :xxl_date
)
end
カンマとセミコロン(, ;)の間にあるスペースが全角のスペースになっている所が有った。すべて半角スペースにすると解決した。
なので他にも有る可能性が有るので全角スペースをチェックする事にした。まずはripgrepをインストールする
$ sudo dnf install ripgrep
で、railsのhomeに行き
$ rg -n –pcre2 ‘\x{3000}’
これで全角スペースがある所を表示してくれる
app/views/agents/index.html.erb
5:<h1>Agents <%= link_to “New agent”, new_agent_path %></h1>
など、私はAgentsと New agentの間を開けたかったので、わざと全角スペースをいれてある(半角だと一つしか入れてくれない)