diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b1f6d0b..451440f 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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 diff --git a/app/views/infractions/show.html.erb b/app/views/infractions/show.html.erb index 61fedc9..b6b53b4 100644 --- a/app/views/infractions/show.html.erb +++ b/app/views/infractions/show.html.erb @@ -1,5 +1,4 @@ -

Infracción #<%= @infraction.tweet_id %> -

+

Infracción #<%= @infraction.tweet_id %>

diff --git a/config/routes.rb b/config/routes.rb index 360fa8c..b122599 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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' diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index 4610a6e..a91b6bf 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -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