Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Did the user modelling, included using the resource route.

  • Loading branch information...
commit 82c1e9ba760d874e39e9e95d7e41578899620292 1 parent 5ea003a
ephox-rob ephox-rob authored
5 app/controllers/users_controller.rb
@@ -2,5 +2,8 @@ class UsersController < ApplicationController
2 2 def new
3 3 @title = "Sign up"
4 4 end
5   -
  5 + def show
  6 + @user = User.find(params[:id])
  7 + @title = "Details for a User"
  8 + end
6 9 end
3  app/views/layouts/application.html.erb
@@ -12,6 +12,7 @@
12 12 <%= yield %>
13 13 </section>
14 14 </div>
15   - <%= render 'layouts/footer' %>
  15 + <%= render 'layouts/footer' %>
  16 + <%= debug params if Rails.env.development?%>
16 17 </body>
17 18 </html>
1  app/views/users/show.html.erb
... ... @@ -0,0 +1 @@
  1 +<%= @user.name%>, <%=@user.email%>
2  config/routes.rb
... ... @@ -1,5 +1,5 @@
1 1 SampleApp::Application.routes.draw do
2   - get "users/new"
  2 + resources :users
3 3
4 4 match "/contact", :to => 'pages#contact'
5 5 match "/about", :to => 'pages#about'

0 comments on commit 82c1e9b

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