Rails, in_place_editor_fieldのサイズ指定
in_place_editor_fieldはAjaxで編集するときにとても便利なツール。
使ってみたら驚いちゃうでしょう。
でも編集時にサイズ指定がうまくいかなかったんだけれど、気づきました。
間違い×
<%= in_place_editor_field :staff, :title, :cols => 60, :rows => 2 %>
正解○
<%= in_place_editor_field :staff, :title, {},{:cols => 60, :rows => 2} %>