ruby - rails duplication code user_attributes -


i have master admin can create 2 different admins [property, content_contributor]. in master admin's require params have this

 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] 

and in master admins property have this

 class masteradmins::propertyadminscontroller < masteradmins::maincontroller  .....  params.require(:property_admin).permit(user_attributes: [:id, :activation_token, :email, :encrypted_password, :authentication_token, :sign_in_count] 

i getting duplicate found in code climate. how can avoid user attribute duplication?


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -