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
Fixes #14802 - Correctly determines if working with Host/Hostgroups page #5994
Conversation
All I changed in all the erbs is "using_hostgroups_page" became "using_hostgroups_page?" |
6cc88f3
to
f6b7b21
Compare
@parthaa theforeman-bot is complaining because of the lack of whitespae around the '-'. Should be: |
f6b7b21
to
19e93be
Compare
Thanks |
Code looks fine to me, haven't tested it yet though |
19e93be
to
c327666
Compare
Prior to this commit the hosts and hostroups pages used the same erbs They were just identifying what constitutes a host page vs hostgroup page in the wrong manner. It used -> @host.nil? to determine this which doesnt work for all situations. This commit instead centralizes that logic in a nice helper and uses a simpler 'check the controller name' approach
c327666
to
91a406d
Compare
ACK from a user perspective. tested a series of provisioning use-cases with and without hostgroups as well as editing existing hosts and it properly assigned the media as selected. Also checked some error handling on empty fields, worked well after an update partha did |
ACK from code perspective. |
merging |
Prior to this commit the hosts and hostroups pages used the same erbs
They were just identifying what constitutes a host page vs hostgroup
page in the wrong manner.
It used -> @host.nil? to determine this which doesnt work for all
situations.
This commit instead centralizes that logic in a nice helper and uses a
simpler 'check the controller name' approach