0

2 人の異なる管理者 [property, content_contributor] を作成できるマスター管理者がいます。マスター管理者のrequire paramsには、これがあります

 class MasterAdmins::ContentContributorsController < MasterAdmins::MainController
....
params.require(:content_contributor).permit(:user_id, user_attributes: [:id, :activation_token, :email, :encrypted_password, :authentication_token, :sign_in_count]

そしてマスター管理者のプロパティにはこれがあります

 class MasterAdmins::PropertyAdminsController < MasterAdmins::MainController
 .....
 params.require(:property_admin).permit(user_attributes: [:id, :activation_token, :email, :encrypted_password, :authentication_token, :sign_in_count]

コード気候で重複が見つかりました。ユーザー属性の重複を避けるにはどうすればよいですか?

4

0 に答える 0