Skip to content
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

Merged

Conversation

eclarizio
Copy link
Member

@abellotti This should do the trick for replacing refresh_json_values, I think. Let me know if you have any feedback.


if dialog_field.dynamic?
dynamic_values = dialog_field.trigger_automate_value_updates
extra_attributes.merge!("values" => dynamic_values)
Copy link
Contributor

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

@abellotti
Copy link
Member

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.

@eclarizio eclarizio force-pushed the update_and_serialize_dialog_fields_method branch from a15bf1c to 1f950ab Compare January 8, 2016 16:56
@miq-bot
Copy link
Member

miq-bot commented Jan 8, 2016

Checked commits eclarizio/manageiq@33e0335~...1f950ab with ruby 2.2.3, rubocop 0.34.2, and haml-lint 0.13.0
12 files checked, 2 offenses detected

spec/models/dialog_field_serializer_spec.rb

gmcculloug added a commit that referenced this pull request Jan 14, 2016
…ields_method

Add method for returning serialized attributes after dynamic updates
@gmcculloug gmcculloug merged commit d6dfda3 into ManageIQ:master Jan 14, 2016
@gmcculloug gmcculloug added this to the Sprint 35 Ending Jan 25, 2016 milestone Jan 14, 2016
h-kataria pushed a commit to h-kataria/manageiq that referenced this pull request Jan 15, 2016
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants