Ruby On Rails Classroom image

Neeraj  Amoli / Professional / Web Technology
 
To post your Question Join Classroom
 
Question No  (2 of 6)
First 1 I 2 I 3 I 4 I 5 I 6 Last
 
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
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 
image
Neeraj
Ask 
image
Shubham
Ask 
image
Vikash
Ask 
image
Anil
 
 

Recommended Classes

Rajendra Kumar
I have more then 5 year of Mobile App Development Experience and have worked in Android Native, I...
Professional
image Anil Bist
in 2006, i Join a web development company in Bangalore and start work on "Ruby on Rail"...
Professional
image Sandeep Srivastava
I am working as software develop from last 9 year.worked in Java, Struts, SpringMVC, Hibernate.
Professional