Remove dead code (#5090) [deploy]
This commit is contained in:
parent
dc5ec4e52f
commit
b34ae9b7d9
3 changed files with 0 additions and 71 deletions
|
|
@ -1,20 +0,0 @@
|
|||
class Internal::DogfoodController < Internal::ApplicationController
|
||||
layout "internal"
|
||||
|
||||
def index
|
||||
usernames = if Rails.env.production?
|
||||
%w[ben jess peter maestromac andy lianafelt]
|
||||
else
|
||||
%w[thepracticaldev bendhalpern]
|
||||
end
|
||||
|
||||
@team_members = User.where(username: usernames).order(comments_count: :desc)
|
||||
user_ids = @team_members.map(&:id)
|
||||
|
||||
@comment_totals_this_week = Comment.
|
||||
users_with_number_of_comments(user_ids, Time.zone.today.beginning_of_week)
|
||||
|
||||
@comment_totals_24_hours = Comment.
|
||||
users_with_number_of_comments(user_ids, 24.hours.ago)
|
||||
end
|
||||
end
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
<center>
|
||||
<h1 style="font-size:3em;">Dog Food Board</h1>
|
||||
<img src="https://thepracticaldev.s3.amazonaws.com/i/dqf9n77i1me0yz14x492.gif" alt="doggies" />
|
||||
|
||||
<h2>Comments past 24 hours</h2>
|
||||
<% @comment_totals_24_hours.each do |comment| %>
|
||||
<div><%= comment[:username] %>: <%= comment[:number_of_comments] %></div>
|
||||
<% end %>
|
||||
|
||||
<h2>Comments this week</h2>
|
||||
<% @comment_totals_this_week.each do |comment| %>
|
||||
<div><%= comment[:username] %>: <%= comment[:number_of_comments] %></div>
|
||||
<% end %>
|
||||
|
||||
<h2>Overall comments</h2>
|
||||
<% @team_members.each do |member| %>
|
||||
<div><%= member.username %>: <%= member.comments_count %></div>
|
||||
<% end %>
|
||||
</center>
|
||||
<br /><br />
|
||||
<div style="margin:auto;max-width:600px">
|
||||
<b>Ways to make comments:</b>
|
||||
<ul>
|
||||
<li>
|
||||
Ask a question on an article
|
||||
</li>
|
||||
<li>
|
||||
Make the first comment in a discussion
|
||||
</li>
|
||||
<li>
|
||||
Say "welcome" to someone making an intro post
|
||||
</li>
|
||||
<li>
|
||||
Make a follow-up comment or question on another comment.
|
||||
</li>
|
||||
<li>
|
||||
Say something simple like "Thanks" or "Great post".
|
||||
</li>
|
||||
<li>
|
||||
And many more!!!
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<br /><br />
|
||||
|
||||
<script>
|
||||
setInterval(function () {
|
||||
location.reload();
|
||||
}, 180000)
|
||||
</script>
|
||||
|
|
@ -36,7 +36,6 @@ Rails.application.routes.draw do
|
|||
resources :buffer_updates, only: %i[create update]
|
||||
resources :classified_listings, only: %i[index edit update destroy]
|
||||
resources :comments, only: [:index]
|
||||
resources :dogfood, only: [:index]
|
||||
resources :events, only: %i[index create update]
|
||||
resources :feedback_messages, only: %i[index show]
|
||||
resources :listings, only: %i[index edit update destroy], controller: "classified_listings"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue