Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
let caller method render flash message for sublist screens. #4368
@martinpovolny @dclarizio please review and suggest if there is another way this issue can be fixed. To recreate the issue Go to Infrastructure Providers, Go to SCVMM Provider summary screen, from there Click on VMs in the relationships box, Select one or more VMs from the list and click on Migrate selected Items button under Lifecycle button. You should see double render error in the log, you should be able to see this behavior for any of the CIs that have link to view VMs in the relationship box on their respective summary screens. Selected VM has to be the one that do not support Migrate task, which is why i used VMs under a SCVMM provider. Let me know if you have questions or need help recreating this issue.
referenced this pull request
Sep 15, 2015
I don't like this; if "just silently ignore a second attempt to render" was the reasonable thing to do, we'd be doing it upstream.
If a controller is so confused that it's trying to render twice, that is a bug in the action's control flow, which should be fixed.
Where is the first render occurring here, and why are we not returning at that point?
@matthewd : You are right. The approach is wrong. But most of the controller code has this issue. So to address the cause we would have to do a major refactoring. Of course, we want to do that and we try to do that as part of our work.
But here we need to make a small enough fix to just fix the bug. Refactoring should be done in a separate PR.
Checked commit h-kataria@a757660 with ruby 1.9.3, rubocop 0.34.2, and haml-lint 0.13.0