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

Remove all "answered_questions" code from app/controllers/tag_controller.rb #8804

Closed
jywarren opened this issue Dec 7, 2020 · 6 comments · Fixed by #9119 or #9235
Closed

Remove all "answered_questions" code from app/controllers/tag_controller.rb #8804

jywarren opened this issue Dec 7, 2020 · 6 comments · Fixed by #9119 or #9235
Labels
fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet help wanted requires help by anyone willing to contribute refactorization Ruby

Comments

@jywarren
Copy link
Member

jywarren commented Dec 7, 2020

We no longer use this code, so we'd love some help just removing all of it! I believe, but am not 100% sure, that tests should pass even after we do this.

@answered_questions = []
@questions&.each { |question| @answered_questions << question if question.answers.any?(&:accepted) }

Thanks for any help on this!!!!

@jywarren jywarren added help wanted requires help by anyone willing to contribute Ruby refactorization labels Dec 7, 2020
@jywarren
Copy link
Member Author

jywarren commented Dec 7, 2020

This has been marked as a good candidate for becoming a first-timers-only issue like these, meaning that it's simple, self-contained, and with some extra formatting, could be a great entry point for a new contributor. If you're familiar enough with this code, please consider reformatting or reposting it as a first-timers-only issue, and then ping @publiclab/reviewers to get it labelled. Or, if this is not your first time, try to solve it yourself!


@jywarren jywarren added the fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet label Dec 7, 2020
@jperk224
Copy link
Contributor

jperk224 commented Dec 9, 2020

@jywarren I would like to work on this. I've been hunting for fto-candidate issues to work on to get more familiar with the repo and been having trouble finding ones that seem to be up for grabs?

@RuthNjeri
Copy link
Contributor

Hi, @jperk224 thank you for reaching out. I've assigned the issue to you. Feel free to ask any questions here if you need any clarification

@jperk224
Copy link
Contributor

Thanks @RuthNjeri ! Can you please confirm which tests I should verify still pass after removing these answered_questions references? I see tag_selection_test.rb, tag_test.rb, and user_tag_test.rb. Is it all or any of them or am I looking in the wrong place? Thank you.

@RuthNjeri
Copy link
Contributor

Hi @jperk224 I see there's also tag_controller_test.rb

@jperk224
Copy link
Contributor

I am still planning to look at this/review it. I haven't had a much time the last few days as I had hoped. If someone is eager to take this on immediately let me know and it can be reassigned, else I hope to get to it soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet help wanted requires help by anyone willing to contribute refactorization Ruby
Projects
None yet
3 participants