Plots2: Showing contributors on /contributors/____ pages

Created on 7 Mar 2018  ·  3Comments  ·  Source: publiclab/plots2

https://publiclab.org/contributors/microplastics says 8 contributors, but below on that page nobody is listed.

The code is here: https://github.com/publiclab/plots2/blob/master/app/views/tag/contributors.html.erb

But it's driven by this controller code:

https://github.com/publiclab/plots2/blob/5ac99163ee3a3ce47a52b3a9ccff0e0bf89aa6a2/app/controllers/tag_controller.rb#L394-L400

Any help fixing this would be appreciated!!!

We should also work to add a test to ensure this page gets properly populated. We could do a functional test in this file:

https://github.com/publiclab/plots2/blob/5ac99163ee3a3ce47a52b3a9ccff0e0bf89aa6a2/test/functional/tag_controller_test.rb#L286-L293

There, we don't really count contributors. We should!

Using assert_equal assigns(:users), 99 (where 99 is the expected number of users)

Ruby bug fto-candidate help wanted

Most helpful comment

I think there may have been a reversion in #2180 which affected @Gauravano's code in #2062:

https://github.com/publiclab/plots2/blob/ca820a87e083ed7aff95e6c903732d2d4fca7949/app/views/tag/_contributors.html.erb

It looks like @noteCount was changed to @note_count and I've reverted that in #2479. I want to add a functional test to ensure these are shown.

All 3 comments

I think there may have been a reversion in #2180 which affected @Gauravano's code in #2062:

https://github.com/publiclab/plots2/blob/ca820a87e083ed7aff95e6c903732d2d4fca7949/app/views/tag/_contributors.html.erb

It looks like @noteCount was changed to @note_count and I've reverted that in #2479. I want to add a functional test to ensure these are shown.

Attempting fix in #2479

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RuthNjeri picture RuthNjeri  ·  3Comments

ebarry picture ebarry  ·  3Comments

first-timers[bot] picture first-timers[bot]  ·  3Comments

milaaraujo picture milaaraujo  ·  3Comments

milaaraujo picture milaaraujo  ·  3Comments