:confirm で日本語を使う方法
Rails 1.2.3で :confirmに日本語が使えないことがある。
以下のように文字列で全角の?を最後に使ったとき。
これだめ
link_to "削除", {:action => :delete, :id => id}, :confirm => "削除しますか?"
これOK
link_to "削除", {:action => :delete, :id => id}, :confirm => "削除しますか"
link_to "削除", {:action => :delete, :id => id}, :confirm => "削除しますか?"
なぜ文字化けが起きるんだろうか?