リア充爆発日記

You don't even know what ria-ju really is.

strong parameterとaccepts_nested_attributes_forを併用する方法

こんな感じのとき

class Parent < ActiveRecord::Base
  has_one :child
  accepts_nested_attributes_for :child

こんな感じでやる

params.require(:parent).permit(
      :name, :name_kana,
      child_attributes: [
        :name, :name_kana,
      ]
    )

福本作品もいいけど、甲斐谷作品もよい。ワンナウツは特に秀逸。

ONE OUTS 1 (ヤングジャンプコミックス)

ONE OUTS 1 (ヤングジャンプコミックス)

ONE OUTS 全20巻 完結セット (ヤングジャンプコミックス)

ONE OUTS 全20巻 完結セット (ヤングジャンプコミックス)