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

Adds variant details to split_details endpoint #45

Conversation

agirlnamedsophia
Copy link
Contributor

@agirlnamedsophia agirlnamedsophia commented Apr 11, 2017

  • adds variant details to split_details endpoint
  • modifies split show page view to display new variant detail information and adds respective feature tests

/domain @Betterment/test_track_core @dschaub

@nanda-prbot
Copy link

Needs somebody from @Betterment/test_track_core to claim domain review.

Use the shovel operator to claim, e.g.:

@myname << domain && platform

text-transform: capitalize;
}
.DescriptionTable {
@include standard-table(100%, 15%, 35%);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a new table style to support the split show page layout

@@ -1 +1,2 @@
json.(@split_detail, :name, :hypothesis, :assignment_criteria, :description, :owner, :location, :platform)
json.variant_details @split_detail.split.variant_details, partial: 'variant_detail', as: :variant_detail
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I delegate variant_details to split here?

Copy link
Contributor

Choose a reason for hiding this comment

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

you can do that. you'll also want to add includes(:variant_details) wherever the split is being queried

@agirlnamedsophia
Copy link
Contributor Author

nanda?

@nanda-prbot
Copy link

Needs somebody from @Betterment/test_track_core and @dschaub to claim domain review.

Use the shovel operator to claim, e.g.:

@myname << domain && platform

@dschaub
Copy link
Contributor

dschaub commented Apr 11, 2017

<< domain tafn

@nanda-prbot
Copy link

@agirlnamedsophia needs to incorporate feedback from @dschaub. Bump when done.

@agirlnamedsophia
Copy link
Contributor Author

bump @dschaub

@nanda-prbot
Copy link

Needs @dschaub to provide domain review.

When you finish a round of review, be sure to say you've finished or sign off on the PR, e.g.:

TAFN or DomainLGTM

If you're too busy to review, unclaim the PR, e.g.:

@myname >> domain

end

def update
@split_detail = Split.find(params[:split_id]).detail
@split_detail = Split.includes(:variant_details).find(params[:split_id]).detail
Copy link
Contributor

Choose a reason for hiding this comment

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

my bad, I read the view wrong and thought we were iterating over the splits and causing an n+1, the way this worked was totally fine since it's a single query per table.

@dschaub
Copy link
Contributor

dschaub commented Apr 11, 2017

domain lgtm

@nanda-prbot
Copy link

Ready to merge! :squirrel: 🎈 🤘

@agirlnamedsophia agirlnamedsophia merged commit bc1f00c into Betterment:master Apr 11, 2017
@agirlnamedsophia agirlnamedsophia deleted the sr/master/add-variant-data-to-split-details branch April 11, 2017 19:47
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.

3 participants