Refactor wikis and questions partials to use local variable
Please describe the problem (or idea)
What happened just before the problem occurred? Or what problem could this idea solve?
From this https://github.com/publiclab/plots2/pull/3711 PR conversation we found that some partials are using instance variables which makes it hard for them to be rendered anywhere. Its a good first-timer issue
What did you expect to see that you didn't?
We would like them to use a local variable if present and default to an instance variable if not. They should be defined as https://github.com/publiclab/plots2/blob/master/app/views/notes/_notes.html.erb#L1 and replace the instance variable with a local variable everywhere else in the file.
Please show us where to look
The partials to be refactored are
https://github.com/publiclab/plots2/blob/master/app/views/wiki/_wikis.html.erb
https://github.com/publiclab/plots2/blob/master/app/views/questions/_questions.html.erb
add <% wikis = wikis || @wikis %> and replace @wiki with wiki everywhere else in the file.
What's your PublicLab.org username?
@cess
Thanks for opening your first issue! This space is protected by our Code of Conduct - and we're here to help. Please follow the issue template to help us help you 👍🎉😄 If you have screenshots or a gif to share demonstrating the issue, that's really helpful! 📸
Can I work on this?
Yeah sure @gyi2521 go ahead.
Thanks!
On Wed, Nov 7, 2018 at 2:28 PM Cess [email protected] wrote:
Yeah sure @gyi2521 https://github.com/gyi2521 go ahead.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/3915#issuecomment-436747712, or mute the thread https://github.com/notifications/unsubscribe-auth/AoIINw7C0YtMPjiREt1MR9jMSUJM6oleks5uszRNgaJpZM4YSmzE .
@gyi2521 submitted a fix in #3847!
@cesswairimu can you please review #3918 and resolve the conflict. So that we can merge it?
@SidharthBansal cool, on it.
Closing the issue as per your request in #3918. Feel free to close the issues which are completed.