2007-08-17から1日間の記事一覧

AR.attributesの表現

このハッシュのキーは文字列で表されている。よって。テストなどで、merge したい場合は、 options = {:*** => ***} **.attributes.merge(options) でなく、options = {"***" => ***}

AJAXでも、更新するときはredirectしましょう

でないと、更新が直に反映されないからね <table width="160"> <tr> <td width = "80%"> <% form_tag :action => "update_student_status",:id => @student.id do -%> <%= options = (@student_statuses || []) select_tag("student_status_id",options_for_select(options, @student.student_status.i</td></tr></table>…

テーブルを綺麗に

BGColorで線に使いたい色を選んで、セルの背景にしろとかを使う <table cellpadding="2" cellspacing ="1" border="0" bgcolor = "#99dddd" > <colgroup width="300" class = "ListLine1"></colgroup> <colgroup span = "2" class = "ListLine1" width="300"></colgroup> <colgroup span = "1" class = "ListLine1" width="100"></colgroup> <tr> ・・・・…</tr></table>