-
Notifications
You must be signed in to change notification settings - Fork 900
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
[EUWE] Suppots dots in custom attributes #14363
Merged
simaishi
merged 6 commits into
ManageIQ:euwe
from
lpichler:suppots_dots_in_custom_attributes
Mar 20, 2017
Merged
[EUWE] Suppots dots in custom attributes #14363
simaishi
merged 6 commits into
ManageIQ:euwe
from
lpichler:suppots_dots_in_custom_attributes
Mar 20, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
special characters in custom attributes
Field with virtual custom attributes don’t contains associations so it don’t contain “.” as separator it has always form: <Model>-virtual_custom_attribute_<name_of_attribute> After this we need to escape it back because there was dynamic method created with unescaped form, and such method will be called in evaluation.
before: ns= ‘/virtual/parent_resource_pool/name’ predicate = ns.split("/") => ["", "virtual", "parent_resource_pool", "name"] predicate = ns.split(“/“)[2..-1] # throw away /virtual => ["parent_resource_pool", "name"] after: (same) ns= ‘/virtual/parent_resource_pool/name’ ns.gsub!("/virtual/","") # throw away /virtual => ‘parent_resource_pool/name’ predicate = ns.split("/") => ["parent_resource_pool", "name"]
…acters now there is allowed to have special characters as `-` and `.` `/`
Checked commits lpichler/manageiq@dd5aa33~...c5bf37f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/models/miq_report.rb
lib/extensions/ar_taggable.rb
lib/miq_expression.rb
|
gtanzillo
approved these changes
Mar 16, 2017
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.
LGTM 👍
zeari
approved these changes
Mar 19, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
temporarily replacing #11112
fixes #10482 point 1
Using
URI::RFC2396_Parser
from #13713 - thanks! @gtanzillo @cben @zeari@miq-bot add_label euwe/yes, bug, reporting
cc @simon3z
please review @cben @zeari
@miq-bot assign @gtanzillo
I have explanation in commit messages.
tested:
Links [Optional]