タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

RoR5に関するel-condorのブックマーク (1)

  • Post by @y-yagi

    Rails 5から、attributes APIという機能がActive Recordに追加されました。attributes APIは、既に存在するattributeのtypeを上書きしたり、任意のattributeを定義出来る機能です。 create_table "books", force: :cascade do |t| t.string "name" t.integer "price" t.date "published_on" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "out_of_print", default: "false" end

    Post by @y-yagi
    el-condor
    el-condor 2016/03/09
    これ、ActiveModelじゃないんだなー。ActiveModelにあったら(特にDateとかTime)、狂喜乱舞する人も多かろうに(主に私)
  • 1