From 1d90f33bf07f9610d358c6c9c56754784b050541 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Mar 2014 10:57:54 -0500 Subject: simplify the sessions routing --- app/views/layouts/application.html.erb | 17 +++++++++-------- app/views/sessions/new.html.erb | 2 +- app/views/static/homepage.html.erb | 4 ++-- app/views/users/new.html.erb | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) (limited to 'app/views') diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index b36c0c5..f12c778 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -19,14 +19,15 @@ <%= submit_tag("Go", {:class => "btn btn-warning"}) %> <% end %> - <% if signed_in? %> -
  • <%= current_user.user_name.upcase %>
  • - <% end %> -
  • - <%= if signed_in? do %> - <%= link_to "Sign out", signout_path, method: "delete" %> - <% end; end %> -
  • + diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 2e7a0d3..a820b2f 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -15,6 +15,6 @@ <%= f.submit "Sign in", class: "btn btn-large btn-primary" %> <% end %> -

    New user? <%= link_to "Sign up now!", signup_path %>

    +

    New user? <%= link_to "Sign up now!", new_user_path %>

    diff --git a/app/views/static/homepage.html.erb b/app/views/static/homepage.html.erb index 8b96e11..3ca8176 100644 --- a/app/views/static/homepage.html.erb +++ b/app/views/static/homepage.html.erb @@ -5,8 +5,8 @@

    This is a tournment management system designed to be used for any team sport. Our peer review system ensures that the best players move on to the next round! Try creating a new tournament and having people sign up for it.

    <% if !signed_in? %> - <%= link_to 'Log In', "/signin", :class => "btn btn-warning btn-lg", :role => "button" %> - <%= link_to 'Sign Up', "/signup", :class => "btn btn-warning btn-lg", :role => "button" %> + <%= link_to 'Log In', new_session_path, :class => "btn btn-warning btn-lg", :role => "button" %> + <%= link_to 'Sign Up', new_user_path, :class => "btn btn-warning btn-lg", :role => "button" %> <% else %> <%= link_to 'Start a Tournament', new_tournament_path, :class => "btn btn-warning btn-lg", :role => "button" %> <% end %> diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index aa71f00..f0ce746 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -56,5 +56,5 @@

    -<%= link_to 'Already Have an Account? Log in', "signin", :class => "btn btn-warning btn-lg" %> +<%= link_to 'Already Have an Account? Log in', new_session_path, :class => "btn btn-warning btn-lg" %> -- cgit v1.2.3-2-g168b