link_to の action が id に化ける。Railsのバグ?
ビューファイルで(↓)のようにつくったら、
<%= link_to 'ランダマイズ', :controller=>:touhyous, :action=>:randamize %>
htmlのソースを見たところでは(↓)のように展開されていた。
<a href="/touhyous/randamize">ランダマイズ</a>
そのリンクをクリックすると(↓)のようなエラーになった。
http://localhost:3000/touhyous/randamize Couldn't find Touhyou with ID=randamize Parameters: {"id"=>"randamize"}
「:action=>:randamize」と指定したのに、なんで {"id"=>"randamize"} に代わってしまうのか?
ダミーのidを入れたら通ったが、
<%= link_to 'ランダマイズ', :controller=>:touhyous, :action=>:randamize,:id=>0 %>
(htmlのソースでは(↓))
<a href="/touhyous/randamize/0">ランダマイズ</a>
Railsのバグじゃないのかな?