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
Add method for returning serialized attributes after dynamic updates #6097
Add method for returning serialized attributes after dynamic updates #6097
Conversation
|
||
if dialog_field.dynamic? | ||
dynamic_values = dialog_field.trigger_automate_value_updates | ||
extra_attributes.merge!("values" => dynamic_values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra_attributes["values"] = dynamic_values
- has the same effect, but shorter and faster
Hi @eclarizio, I think this is good. For a while I thought we needed the checked_value parameter for the new method as per refresh_json_value for drop down list and radio button, but those values are set in the dialog by the API via dialog_fields, so I think we're ok. |
a15bf1c
to
1f950ab
Compare
Checked commits eclarizio/manageiq@33e0335~...1f950ab with ruby 2.2.3, rubocop 0.34.2, and haml-lint 0.13.0 spec/models/dialog_field_serializer_spec.rb
|
…ields_method Add method for returning serialized attributes after dynamic updates
MR for PR6097 - Add method for returning serialized attributes after dynamic updates This MR adds a method that will be used by the API in order to return all attributes of a dynamic dialog field (after it has run through its respective automate method). Cherry-pick was clean aside from the `dialog_field_serializer_spec` which I changed to use stubs instead of "allow" since this branch isn't on the latest Rspec yet. PR: ManageIQ#6097 BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1297953 See merge request !715
@abellotti This should do the trick for replacing
refresh_json_values
, I think. Let me know if you have any feedback.