Ruby On Rails Classroom
Neeraj Amoli /
Professional /
Web Technology
To post your Question Join Classroom
Question:-
How to permit nester attributes in Rails controllers for such model?
class User
has_one :profile
accepts_nested_attributes_for :profile
end
Answers:
• params.require(:user).permit(:email, profile: [:id, :_destroy])
• params.require(:user).permit(:email, profile: {:id, :_destroy})
• params.require(:user).permit(:email, profile_attributes: [:id, :_destroy])
• params.require(:user).permit(:email, profile_attributes: {:id, :_destroy})
Answer:-
![image](/images/gyapti/user/401/neeraj.jpg)
Neeraj Amoli
Skills Ruby On Rails
Qualifications :-Location :-Dehradun,Dehradun,Uttrakhand,
Description:-
I have 3 year experience as a Software Engineer. My Skilled are Android Development (Java), ROR Development .
Explore
Students (4)
Ask
![](/Classroom/images/question.png)
![image](/images/gyapti/user/401/neeraj.jpg)
Neeraj
Ask
![](/Classroom/images/question.png)
![image](/images/gyapti/user/404/20953196_687329651464026_8860388909858732276_n.jpg)
Shubham
Ask
![](/Classroom/images/question.png)
![image](/images/gyapti/user/396/img_JPG.jpg)
Vikash
Ask
![](/Classroom/images/question.png)
![image](/images/gyapti/user/93/anilbisht.jpg)
Anil
Recommended Classes
![image](/images/gyapti/user/93/anilbisht.jpg)
I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore an...
Professional
![image](/images/gyapti/user/673/IMG_2472_JPG.jpg)
Passionate about LIFE and Learning. Lets explore together better version of "self", &qu...
Professional
![image](/images/gyapti/user/673/IMG_2472_JPG.jpg)
Passionate about LIFE and Learning. Lets explore together better version of "self", &qu...
Professional