FOSSASIA
PublicLab: History graph for wildcard tag display should not be displayed
Overview
We display a graph of recent activity on tag listing pages like https://publiclab.org/tag/balloon-mapping. But we also allow "wildcard" tags like: https://publiclab.org/tag/question:* -- and these should not show a graph.
Objective
The following code (on this line: https://github.com/publiclab/plots2/blob/master/app/views/tag/show.html.erb#L25) is suppose to detect that and not show the graph, but is not working properly:
<% if @tags.first %>
We sould:
- Modify the conditional above to use the same logic as the controller (https://github.com/publiclab/plots2/blob/master/app/controllers/tag_controller.rb#L28), making it: @tags.first && params[:id][-1..-1] != "*" -- which ensures that the last character is not a wildcard.
- Add a test that checks this page and ensures a graph is not shown:
More at: https://github.com/publiclab/plots2/issues/878
Requirements
- Knowledge of git and github
- Some knowledge of Ruby
- Some knowledge of Rails framework will be great
Expected Outcome
- Create a Pull request incorporating this feature
- Writing a functional test would be just awesome!
Task tags
Students who completed this task
Sawyer Charles