Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
remove deprecated users#show action
Browse files Browse the repository at this point in the history
  • Loading branch information
sirkosi committed May 2, 2016
1 parent 40197c7 commit ccfa2a6
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 16 deletions.
5 changes: 0 additions & 5 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@ class UsersController < ApplicationController
def index
@users = User.where("infractions_count > 0").order("infractions_count DESC")
end

# GET /users/:twitter_username
def show
@user = User.where(username: params[:username])
end
end
3 changes: 1 addition & 2 deletions app/views/infractions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<h2>Infracción #<%= @infraction.tweet_id %>
</h2>
<h2>Infracción #<%= @infraction.tweet_id %></h2>

<div class="row detail bordered">
<div class="span12">
Expand Down
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Rails.application.routes.draw do
root 'infractions#index'
resources :users, only: [:show]
resources :infractions, only: [:index, :show]
get 'leaderboard' => 'users#index'
get ':username' => 'infractions#index'
Expand Down
8 changes: 0 additions & 8 deletions spec/controllers/users_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,4 @@
expect(response.status).to eq(200)
end
end

describe "#show" do
xit "successful" do
get :show, id: user.id

expect(response.status).to eq(200)
end
end
end

0 comments on commit ccfa2a6

Please sign in to comment.