routing. various stuff

This commit is contained in:
Espen Antonsen 2009-06-09 00:30:22 +02:00
parent c4966f7bc6
commit 050d1c4837
30 changed files with 870 additions and 799 deletions

View file

@ -10,7 +10,7 @@ class UsersController < ApplicationController
@user = User.new(params[:user])
if @user.save
flash[:notice] = "Account registered!"
redirect_back_or_default account_url
redirect_back_or_default account_path
else
render :action => :new
end
@ -28,7 +28,7 @@ class UsersController < ApplicationController
@user = @current_user # makes our views "cleaner" and more consistent
if @user.update_attributes(params[:user])
flash[:notice] = "Account updated!"
redirect_to account_url
redirect_to account_path
else
render :action => :edit
end