From 7b900bda2dc12bc5fc1256c253b03912521e3f0d Mon Sep 17 00:00:00 2001 From: Ken Johnson Date: Mon, 10 Jun 2013 16:25:14 -0400 Subject: [PATCH] fixes issue #24 --- app/controllers/tutorials_controller.rb | 4 + app/views/layouts/tutorial/_header.html.erb | 19 +++- .../tutorial/credentials/_creds.html.erb | 96 +++++++++++++++++++ config/routes.rb | 1 + db/seeds.rb | 3 +- 5 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 app/views/layouts/tutorial/credentials/_creds.html.erb diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index 08cee31..d27a0ca 100755 --- a/app/controllers/tutorials_controller.rb +++ b/app/controllers/tutorials_controller.rb @@ -6,6 +6,10 @@ class TutorialsController < ApplicationController def index end + def credentials + render :partial => "layouts/tutorial/credentials/creds" + end + def show render "injection" end diff --git a/app/views/layouts/tutorial/_header.html.erb b/app/views/layouts/tutorial/_header.html.erb index 5b96e27..457e333 100755 --- a/app/views/layouts/tutorial/_header.html.erb +++ b/app/views/layouts/tutorial/_header.html.erb @@ -1,6 +1,5 @@
- <% if not current_user %> <% end %> + -
\ No newline at end of file + + + + + \ No newline at end of file diff --git a/app/views/layouts/tutorial/credentials/_creds.html.erb b/app/views/layouts/tutorial/credentials/_creds.html.erb new file mode 100644 index 0000000..8e42115 --- /dev/null +++ b/app/views/layouts/tutorial/credentials/_creds.html.erb @@ -0,0 +1,96 @@ + + + + + + + + + \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 0ff89e9..5db7baa 100755 --- a/config/routes.rb +++ b/config/routes.rb @@ -34,6 +34,7 @@ get "download" => "benefit_forms#download" resources :tutorials do collection do + get "credentials" get "injection" get "xss" get "broken_auth" diff --git a/db/seeds.rb b/db/seeds.rb index 2d5f73b..9750d82 100755 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -5,7 +5,8 @@ users = [ { :email => "admin@metacorp.com", - :admin => true, :password => "admin1234", + :admin => true, + :password => "admin1234", :first_name => "Admin", :last_name => "", :user_id =>1