Posts by Sergio Peixoto • 31 points
2 posts
-
3
votes2
answers240
viewsA: accepts_nested_attributes_for no Rails 4
Include in new of my controller def new @motor = Motor.new @motor.pecas.build # Linha incluída end In the object view motor, the object peca has to be pluralized. <%= form_for(@motor) do |f|…
-
0
votes2
answers240
viewsQ: accepts_nested_attributes_for no Rails 4
Expensive! I’m having a hard time because I’m new in Rails. I am trying to generate a form with two models through Nested Form Rails. It is a simple model. "Motor" has one or more "parts", and…