Skip to content
Browse files

Show users

  • Loading branch information...
1 parent cecb330 commit 00adf5afb42dce623eda1b895dd142469742d79a @halogenandtoast halogenandtoast committed
Showing with 11 additions and 0 deletions.
  1. +6 −0 app/controllers/users_controller.rb
  2. +4 −0 app/views/users/show.html.erb
  3. +1 −0 config/routes.rb
View
6 app/controllers/users_controller.rb
@@ -0,0 +1,6 @@
+class UsersController < ApplicationController
+ def show
+ @user = User.find(params[:id])
+ @shouts = @user.shouts.current
+ end
+end
View
4 app/views/users/show.html.erb
@@ -0,0 +1,4 @@
+<h1><%= @user.email %></h1>
+<div id="shouts">
+ <%= render @shouts %>
+</div>
View
1 config/routes.rb
@@ -1,6 +1,7 @@
Shouter::Application.routes.draw do
root to: "welcome#index"
resource :dashboard, only: [:show]
+ resources :users, only: [:show]
resources :shouts, only: [:show]
resources :text_shouts, only: [:create]
resources :photo_shouts, only: [:create]

0 comments on commit 00adf5a

Please sign in to comment.
Something went wrong with that request. Please try again.