Skip to content

exclude multiple fields inline#141

Merged
mcclayton merged 3 commits intoprocore-oss:masterfrom
pabhinaya:exclude_fields
Apr 4, 2019
Merged

exclude multiple fields inline#141
mcclayton merged 3 commits intoprocore-oss:masterfrom
pabhinaya:exclude_fields

Conversation

@pabhinaya
Copy link
Copy Markdown
Contributor

@pabhinaya pabhinaya commented Mar 21, 2019

@mcclayton , For derived views with multiple included views, ability to exclude multiple fields inline.

Copy link
Copy Markdown
Contributor

@philipqnguyen philipqnguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pabhinaya this is a great addition! Would you add a test for exclude_fields?

@mcclayton
Copy link
Copy Markdown
Contributor

mcclayton commented Mar 25, 2019

Yes thank you so much for your contribution. As Philip pointed out, it'd be great if you wouldn't mind adding a test to view_spec.rb similar to: https://github.com/procore/blueprinter/blob/master/spec/units/view_spec.rb#L15-L23
and then I can handle drafting up the release/version bump/CHANGELOG entry.

@pabhinaya
Copy link
Copy Markdown
Contributor Author

@philipqnguyen, @mcclayton I have added the specs for exclude_fields. Please proceed.

@ritikesh
Copy link
Copy Markdown
Collaborator

ritikesh commented Apr 1, 2019

I believe exclude should be able to take 1 or more arguments. Both the below examples should be valid usages of exclude:

exclude :field1
exclude :field1, :field2

This should be possible with Ruby's splat operator.

@philipqnguyen
Copy link
Copy Markdown
Contributor

@ritikesh normally I would agree with your suggestion too, but I think having plural excludes would fit with current patterns: ie.,field for single and fields for multiple fields.

Copy link
Copy Markdown
Contributor

@mcclayton mcclayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll draft a release for this after this is merged if this looks good to @philipqnguyen

@mcclayton mcclayton merged commit a05ad6a into procore-oss:master Apr 4, 2019
@mcclayton mcclayton mentioned this pull request Apr 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants