publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
957 stars 1.83k forks source link

/methods page not working #2007

Closed icarito closed 6 years ago

icarito commented 6 years ago

logs show:

  Rendered wiki/methods.html.erb within layouts/application (393.0ms)
Completed 500 Internal Server Error in 394ms (ActiveRecord: 169.6ms)

ActionView::Template::Error (undefined local variable or method `node' for #<Node:0x007fbb91d64378>):
    39:           <% if @compact.nil? %>
    40:             <% if params[:action].to_s.include?("methods") %>
    41:               <p><small>
    42:                 <a <% if @widget %>target="_blank"<% end %> href="<%= node.path %>#Activities"><i class="fa fa-flask" style="color:#3da56a;"></i> <%= node.activities.count %> activities</a> &nbsp;
    43:                 <!-- <p><i class="fa fa-users" style="color:blue"></i> contributors</p> -->
    44:                 <a <% if @widget %>target="_blank"<% end %> href="<%= node.path %>#Questions"><i class="fa fa-question-circle" style="color:#db3a1e;"></i> <%= node.questions.count %> questions</a>
    45:               </small></p>
  app/models/node.rb:744:in `activities'
  app/views/notes/_notes.html.erb:42:in `block in _app_views_notes__notes_html_erb___3337737635993643078_70221801028420'
  app/views/notes/_notes.html.erb:4:in `_app_views_notes__notes_html_erb___3337737635993643078_70221801028420'
  app/views/wiki/methods.html.erb:58:in `_app_views_wiki_methods_html_erb__756383620209153283_70221780669980'
  app/controllers/wiki_controller.rb:420:in `methods'

Reported by Chris Diehl

ViditChitkara commented 6 years ago

@icarito I will have a look!!