リア充爆発日記

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

2013-09-22から1日間の記事一覧

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, ] ) 福本作品もいいけど、甲斐…