Rails Nested Attribute using Model Data?

Start with this and see if the fields_for actually shows up. By which I mean you actually have a review when you go to the new action.

Start with this and see if the fields_for actually shows up. By which I mean you actually have a review when you go to the new action. Def new @title = "Employee Review" @review = EmployeeReview.new() @employee = Employee.

Find(params:employee_id) @categories = ReviewCategory. All conditions = {:review_category_id => ReviewCategory.first. Id} @rating = @review.

Review_ratings. Build(conditions) end First we need to see if fields_for is actually working and then can do you custom stuff. Let me know what happens when you swap out this code.

When I use this, my form shows the fields for only the first category. – NicSlim Jul 19 at 0:01 That's because we only did one category. Submit this and see what happens.

See if fields_for actually saves the nested associations. – Codeglot Jul 19 at 0:04 I just submitted and it didn't save the nested associations. – NicSlim Jul 19 at 1:58 Please post your logs.

Show the parameters that were passed. – Codeglot Jul 19 at 2:51 Here are the params that were passed: {"employee_review"=>{"review_ratings_attributes"=>{"0"=>{"comment"=>"good job! ", "score"=>"4"}}}, "commit"=>"Submit", "authenticity_token"=>"OB4v9phdHy9McxmAB4W6nSt9vdPxhIyN0GtDBBuLJZ0=", "utf8"=>"✓", "employee_id"=>"10"} – NicSlim Jul 19 at 14:34.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions