diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b1e6401..c8cd616 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,4 +1,9 @@ class UsersController < ApplicationController + def show + @user = User.friendly.find(params[:id]) + @comments = @user.comments + end + def new @user = User.new end diff --git a/app/models/subcreddit.rb b/app/models/subcreddit.rb index f1aa3d1..ea37b6a 100644 --- a/app/models/subcreddit.rb +++ b/app/models/subcreddit.rb @@ -16,13 +16,12 @@ class Subcreddit < ActiveRecord::Base presence: true, format: /\A(?! )[a-z0-9 ]*(?