Changeset 77

Show
Ignore:
Timestamp:
02/05/08 12:03:38 (10 months ago)
Author:
jweiss
Message:

Fix some routes if Webistrano is not mounted under /

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/sessions_controller.rb

    r33 r77  
    1515        cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at } 
    1616      end 
    17       redirect_back_or_default('/') 
     17      redirect_back_or_default( home_path ) 
    1818      flash[:notice] = "Logged in successfully" 
    1919    else 
     
    2828    reset_session 
    2929    flash[:notice] = "You have been logged out." 
    30     redirect_back_or_default('/') 
     30    redirect_back_or_default( home_path ) 
    3131  end 
    3232end 
  • trunk/app/views/layouts/application.html.erb

    r73 r77  
    6262        <div id="footer_logged"> 
    6363          <% if logged_in? %> 
    64            Logged in as <%= link_to h(current_user.login), user_path(current_user) %> | <%= link_to 'Logout', '/logout' %>  
     64           Logged in as <%= link_to h(current_user.login), user_path(current_user) %> | <%= link_to 'Logout', logout_path %>  
    6565          <% end %> 
    6666    </div> 
    67     Copyright &copy; 2007 | Version <%=h WEBISTRANO_VERSION %> | <a href="http://labs.peritor.com/webistrano" target="_blank">http://labs.peritor.com/webistrano</a> 
     67    Copyright &copy; 2007, 2008 | Version <%=h WEBISTRANO_VERSION %> | <a href="http://labs.peritor.com/webistrano" target="_blank">http://labs.peritor.com/webistrano</a> 
    6868  </div> 
    6969 
  • trunk/config/routes.rb

    r34 r77  
    3838   
    3939  # stylesheet 
    40   map.logout '/stylesheets/application.css', :controller => 'stylesheets', :action => 'application' 
     40  map.stylesheet '/stylesheets/application.css', :controller => 'stylesheets', :action => 'application' 
    4141 
    4242  # Install the default route as the lowest priority.