Skip to content

Latest commit

 

History

History
66 lines (61 loc) · 1.99 KB

File metadata and controls

66 lines (61 loc) · 1.99 KB

// $ // // $(.upvoteButton).on('click', function(event) { // event.preventDefault(); // var targetReview = this.parentElement.action; // // var id = this.id; // // var request = $.ajax({ // url: ${targetReview}.json, // method: 'POST', // error: function() { // alert('Please sign in!'); // } // }); // // request.done(function(data) { // document.getElementById(upcount${id}).innerHTML = ${data.upvotes} upvotes; // document.getElementById(downcount${id}).innerHTML = ${data.downvotes} downvotes; // document.getElementById(sum${id}).innerHTML = sum of votes: ${data.sumvotes}; // }); // }); // // $(.downvoteButton).on('click', function(event) { // event.preventDefault(); // var targetReview = this.parentElement.action; // var id = this.id; // // var request = $.ajax({ // url: ${targetReview}.json, // method: 'POST', // error: function() { // alert('Please sign in!'); // } // }); // // request.done(function(data) { // document.getElementById(upcount${id}).innerHTML = ${data.upvotes} upvotes; // document.getElementById(downcount${id}).innerHTML = ${data.downvotes} downvotes; // document.getElementById(sum${id}).innerHTML = sum of votes: ${data.sumvotes}; // }); // // }); // });

Devtools

<%= form_tag(devtools_path, method: :get) do %> <%= text_field_tag :search, params[:search] %> <%= submit_tag "Search", title: nil %> <% end %>

<% if !current_user.nil? && current_user.admin? %>

Welcome Super Elite Group 8 member, you are a member of an exclusive, Clandestine, and Dope AF club.

<% end %>

<% @devtools.each do |devtool|%>

  • <%= link_to devtool.title, devtool_path(devtool) %> <% if !current_user.nil? && current_user.admin? %> <%= link_to 'delete', devtool, method: :delete %> <% end %>
  • <% end %>
    <%= link_to "Add New Dev Tool", new_devtool_path %>