diff options
author | Azul <azul@leap.se> | 2012-12-07 13:00:44 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-12-07 13:59:00 +0100 |
commit | 85be030a434cfab4b7728e4883624d362ec7afbd (patch) | |
tree | dadeba674b52640495073fc58d405c23c7528738 /users/app/controllers | |
parent | 4aff08fe9696d2f6b92f8a8c2bbb2f96a26277e7 (diff) |
first stub at displaying success messages
Diffstat (limited to 'users/app/controllers')
-rw-r--r-- | users/app/controllers/users_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb index 320ed96..24db13b 100644 --- a/users/app/controllers/users_controller.rb +++ b/users/app/controllers/users_controller.rb @@ -22,7 +22,9 @@ class UsersController < ApplicationController end def create - @user = User.create(params[:user]) + if @user = User.create(params[:user]) + flash[:notice] = t(:user_created_successfully) + end respond_with @user end @@ -30,7 +32,9 @@ class UsersController < ApplicationController end def update - @user.update_attributes(params[:user]) + if @user.update_attributes(params[:user]) + flash[:notice] = t(:user_updated_successfully) + end respond_with @user, :location => edit_user_path(@user) end |