scss org and parenthood adding
This commit is contained in:
@ -3,7 +3,10 @@ class RelationshipsController < ApplicationController
|
||||
parent = Person.find(params[:parent])
|
||||
child = Child.find(params[:child])
|
||||
|
||||
parent.parenthoods.create(child)
|
||||
ap parent
|
||||
ap child
|
||||
|
||||
parent.parenthoods.create(child_id: child.to_i)
|
||||
|
||||
redirect_to :back, notice: 'Child added to parent!'
|
||||
end
|
||||
|
Reference in New Issue
Block a user