業務システムの入力には金額がつきものだ。でも現状では、その度に以下のように書く必要がある。 <%= text_field 'slip', 'total_yen', :value=>number_with_delimiter(@slip.total_yen), :autocomplete=>'off', :style=>"text-align:right" %> 上記のような長い長いオプションと共に何度も書くのは面倒だ...。できることなら「yen_field 'slip', 'total_yen'」で済ませたい。そこでソースを見て悩んだ結果、以下のようにヘルパーとして登録しておけば、何とか実現できそう。 options.merge!でデフォルトのオプションを設定しておくことで、自分好みの便利なフォームに自由に変更することができる。 # ヘルパー: app/helpers/applicati