Closed lunij closed 7 years ago
You could merge the thing_group in the parameters, although I think it isn't the right way
def thing_params
params.require(:thing).permit(:something).merge(thing_group: thing_group)
end
Edit: Use expose :thing, parent: thing_group
With version 3 of decent_exposure it is not possible to provide a non-empty param to build a new record using the
new
method. That seem to be a problem with required nested resources.A partial solution to fix the
new
action could be:Problem: It does not work with the
create
action because of the not included strong parameters methodthing_params
.A partial solution to fix the
create
action could be:Problem: It crashes with the
new
action because of thething_params
method that requires athing
key in the params hash.So how is this intended to work?