New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
has_many creation fails on current master. Works on pre4 #4548
Comments
Please post the full console output of that request, the admin resource file and all related model files. |
Same here.
Admin resource file:
Exercise model:
Outline model:
ExerciseAssignation model:
|
I had the same issue, all the queries were running twice. Down grade to |
I've face with same issue after some time of research i figure out what was wrong. The main problem in these lines def build_resource
get_resource_ivar || begin
resource = build_new_resource
resource = apply_decorations(resource)
# problem here
resource = assign_attributes(resource, resource_params)
run_build_callbacks resource
authorize_resource! resource
set_resource_ivar resource
end
end
def build_new_resource
# and here
scoped_collection.send method_for_build, *resource_params
end As we can see a double assignment happen. @shaicoleman when you fix a regression seems we get this bug. I think rollback is not good bcz in ur PR you try to fix regression. Thank you. |
Same issue. It seems after this PR #4426 we don't need |
I have reverted #4426, can someone confirm that this bug is fixed on master? |
@timoschilling I've checked |
@railscard THX |
#4426 is now reverted, sorry for the late responce |
I am facing the same issue in ActiveAdmin version - 1.3.1 |
I tried using the current master to my project.
I have a has_many form such as.
This form works fine on 0.6 and 1.0.0.pre4 but on current master it fails to create because of duplicate key constraint on my model.
I put a breakpoint in data_acces.rb in the save_model method and my object for some reason was created with two identical sub categories even though the params sent to the controler were fine (only one).
The text was updated successfully, but these errors were encountered: