-
Notifications
You must be signed in to change notification settings - Fork 4
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
Separate local from imported metadata properties for ScannedResources #412
Separate local from imported metadata properties for ScannedResources #412
Conversation
7fc2da3
to
4303165
Compare
# @param attribute_names [Symbol] | ||
def self.suppress(attribute_names) | ||
attribute_names = Array.wrap(attribute_names) | ||
attribute_names.each { |attribute_name| self.displayed_attributes.delete(attribute_name) } |
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.
I think several of these could be shortened, e.g. couldn't this be:
self.displayed_attributes -= Array.wrap(attribute_names)
@@ -0,0 +1,28 @@ | |||
<div id="attributes"> |
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.
Can we avoid some of these duplicate views? Could we make one of them _resource_attributes_default.html.erb
? Could we have one copy and then have this view and the other one call out to it with render partial
?
I like the general approach here, and think this is a big improvement on making the logic for what to display clearer. I left a couple of comments around streamlining a couple of things. |
…tes; Separating imported metadata attributes from local attributes within the ScannedResource and ScannedMap Decorators
…ucturing the view templates to use a partial for imported attributes
4303165
to
885d2bd
Compare
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.
👍 looks good!
Resolves #331