Plots2: Fix broken tag pages with simple array conversion

Created on 26 Feb 2018  ยท  5Comments  ยท  Source: publiclab/plots2

Hi, this is a first-timers-only issue. This means we've worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If that's you, we're interested in helping you take the first step and can answer questions and help you out as you do. Note that we're especially interested in contributions from people from groups underrepresented in free and open source software!

We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you ๐Ÿ’

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

๐Ÿค” What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

This fixes #2393 and resolves errors on pages like https://publiclab.org/tag/gowanus, so they work properly, like pages such as http://publiclab.org/tag/balloon-mapping

๐Ÿ“‹ Step by Step

  • [ ] ๐Ÿ™‹ Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

  • [ ] ๐Ÿ“ Update the file app/views/tag/show.html.erb in the plots2 repository (press the little pen Icon) and edit the line as shown below.

See this page for some help in taking your first steps!

Below is a "diff" showing in red (and a -) which lines to remove, and in green (and a +) which lines to add:

@@ -18,7 +18,7 @@
       <% else %>
         <h1><%= @wiki.latest.title %></h1>
         <p><%= @wiki.latest.render_body.html_safe.match(/<p>(.+)<\/p>/).to_a.try(:first).to_s.html_safe %></p>
-        <p><%= link_to("Learn more on the wiki page", "/wiki/#{params[:id]}") if @wiki.latest.render_body.html_safe.match(/<p>(.+)<\/p>/).length > 1 %></p>
+        <p><%= link_to("Learn more on the wiki page", "/wiki/#{params[:id]}") if @wiki.latest.render_body.html_safe.match(/<p>(.+)<\/p>/).to_a.length > 1 %></p>
       <% end %>
     </div>
   <% elsif @wildcard %>
  • [ ] ๐Ÿ’พ Commit your changes

  • [ ] ๐Ÿ”€ Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • [ ] ๐Ÿ Done Ask in comments for a review :)

๐Ÿค”โ“ Questions?

Leave a comment below!

Is someone else already working on this?

We encourage you to link to this issue by mentioning the issue # in your pull request, so we can see if someone's already started on it. If someone seem stuck, offer them some help! Otherwise, take a look at some other issues you can help with. Thanks!

(This issue was created by First-Timers-Bot.)

Ruby first-timers-only help wanted

Most helpful comment

Thanks @Loaderon !!

All 5 comments

Claim!

Hi @jywarren, I want to start contributing to open-source and would love to work with you guys! Let me know if any new issue for first-timer comes up!! Thanks :)

Hi @chitra591, you can easily find first-timers-only tagged issues by searching them up in the search bar, just write: label:first-timers-only is:open

or click on this link: https://github.com/search?utf8=%E2%9C%93&q=label%3Afirst-timers-only+is%3Aopen&type=Issues&ref=searchresults

Hope that helps, cheers!

Thanks @Loaderon !!

Solved in #2403 ! Thank you!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jywarren picture jywarren  ยท  3Comments

keshavsethi picture keshavsethi  ยท  3Comments

keshavsethi picture keshavsethi  ยท  3Comments

RuthNjeri picture RuthNjeri  ยท  3Comments

grvsachdeva picture grvsachdeva  ยท  3Comments