これまでのところ、ユーザーとプロファイルの 2 つのモデルがあります
Class User < ActiveRecord::Base
has_one :profile
accepts_nested_attributes_for :profile
Class Profile < ActiveRecord::Base
belongs_to :user
私のアクティブな管理者モデルについて
form do |f|
f.inputs "User" do
f.input :email
#code to get the profile data
end
f.action :submit
end
そのため、ユーザーフォームでプロファイルデータを取得したいのですが、いくつか試してみましたが、取得できませんでした。