diff options
author | jessib <jessib@riseup.net> | 2013-08-08 11:54:19 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-08-08 11:54:19 -0700 |
commit | bca39b8f0d44dc31f77a3bfc8a94d452b4c77670 (patch) | |
tree | e3ee949bf6e02fc1bbc2ab8e3f247105b962b08e /users/app/controllers/email_settings_controller.rb | |
parent | 31441fc921c3a60bff7c606f1da343fdd62d80d5 (diff) | |
parent | b1065710102193ba11e2a18b5f6506ba1d5b31f9 (diff) |
Merge pull request #64 from azul/feature/identity-rewrite
Feature/identity rewrite
Diffstat (limited to 'users/app/controllers/email_settings_controller.rb')
-rw-r--r-- | users/app/controllers/email_settings_controller.rb | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/users/app/controllers/email_settings_controller.rb b/users/app/controllers/email_settings_controller.rb deleted file mode 100644 index f7d85be..0000000 --- a/users/app/controllers/email_settings_controller.rb +++ /dev/null @@ -1,41 +0,0 @@ -class EmailSettingsController < UsersBaseController - - before_filter :authorize - before_filter :fetch_user - - def edit - @email_alias = LocalEmail.new - end - - def update - @user.attributes = cleanup_params(params[:user]) - if @user.changed? - if @user.save - flash[:notice] = t(:changes_saved) - redirect - else - if @user.email_aliases.last && !@user.email_aliases.last.valid? - # display bad alias in text field: - @email_alias = @user.email_aliases.pop - end - render 'email_settings/edit' - end - else - redirect - end - end - - private - - def redirect - redirect_to edit_user_email_settings_url(@user) - end - - def cleanup_params(user) - if !user['email_forward'].nil? && user['email_forward'].empty? - user.delete('email_forward') # don't allow "" as an email forward - end - user - end - -end |