Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
View
@@ -2,5 +2,8 @@ class UsersController < ApplicationController
def new
@title = "Sign up"
end
-
+ def show
+ @user = User.find(params[:id])
+ @title = "Details for a User"
+ end
end
3  app/views/layouts/application.html.erb
View
@@ -12,6 +12,7 @@
<%= yield %>
</section>
</div>
- <%= render 'layouts/footer' %>
+ <%= render 'layouts/footer' %>
+ <%= debug params if Rails.env.development?%>
</body>
</html>
1  app/views/users/show.html.erb
View
@@ -0,0 +1 @@
+<%= @user.name%>, <%=@user.email%>
2  config/routes.rb
View
@@ -1,5 +1,5 @@
SampleApp::Application.routes.draw do
- get "users/new"
+ resources :users
match "/contact", :to => 'pages#contact'
match "/about", :to => 'pages#about'
Please sign in to comment.
Something went wrong with that request. Please try again.