2012-10-03から1日間の記事一覧
ちょっとハマったのでメモ。 class User < ActiveRecord::Base attr_accessible :name, :profile_attributes has_one :profile accepts_nested_attributes_for :profile end class Profile < ActiveRecord::Base attr_accessible :name, :user_id belongs_to…
ちょっとハマったのでメモ。 class User < ActiveRecord::Base attr_accessible :name, :profile_attributes has_one :profile accepts_nested_attributes_for :profile end class Profile < ActiveRecord::Base attr_accessible :name, :user_id belongs_to…