Top > 開発ガイド > コンポーネント移行ガイド > 0.6.9 => 0.6.10

コンポーネント移行ガイド 0.6.9 → 0.6.10

Rubricks本体を0.6.9から0.6.10に変更した際に必要な、コンポーネントの修正点を説明します。

tableのデフォルトをFixed-Layout-Tableに変更しました (2008/06/13)

  • Firefox3への対応として、tableタグのtable-layoutスタイルのデフォルト値をautoからfixedに変更しました。
    table {
      table-layout: fixed;
    }
    
  • テーブルの表示が崩れてしまう場合の対処法は以下の通りです。
    • widthを指定する
        <table class="rubricks_general_table">
          <tr class="rubricks_general_table_even">
            <td style="width:30%;">項目</td>
            <td style="width:70%;">設定値</td>
          </tr>
        </table>
      
    • table-layoutをautoに戻す
        <table class="rubricks_general_table" style="table-layout:auto;">
          <tr class="rubricks_general_table_even">
            <td>項目</td>
            <td>設定値</td>
          </tr>
        </table>
      

GETリクエストにおけるDB更新を制限しました (2008/06/13)

  • CSRF対策の一環として、GETリクエストにてDB更新(AR#create/update/destroy)を行うとExceptionが発生します
    • 更新を行う処理は基本的にPOST/PUT/DELETEで定義してください
    • 遷移上やむをえない場合は以下のようにignore_csrf_validationフラグを立ててください。
        def show
          @model = Sample::SampleModel.find(params[:id])
          @model.c1 = params[:sample_model][:c1]
          @model.c2 = params[:sample_model][:c2]
          @model.c3 = params[:sample_model][:c3]
          @model.ignore_csrf_validation = true
          @model.save!
        end