-
Notifications
You must be signed in to change notification settings - Fork 1
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 email field to csv presenter #121
Conversation
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.
Update specs
@@ -40,7 +43,10 @@ def headers | |||
def fields | |||
@surveys.map do |survey| | |||
CSV.generate_line( | |||
[survey.categories.map {|c| c.name[I18n.locale.to_s] }.join(";")].concat( | |||
[ | |||
survey.user.email, |
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.
Not all surveys have a user, use survey&.user&.email
Codecov Report
@@ Coverage Diff @@
## master #121 +/- ##
=======================================
Coverage 97.36% 97.36%
=======================================
Files 22 22
Lines 342 342
=======================================
Hits 333 333
Misses 9 9
Continue to review full report at Codecov.
|
I proceed to merge this pr, since the test are passing correctly, but codecov is down and breaking travis CI process. |
🎩 What? Why?
This PR adds the email field to the CSV presenter, so when the admin user'll download the Survey results it will be on it.
📌 Related Issues
📷 Screenshots (optional)
👻 GIF