invalid is invalid

This commit is contained in:
Yuki 2015-08-26 01:20:17 +05:30
parent 370d66105f
commit c2da575955
1 changed files with 2 additions and 2 deletions

View File

@ -138,12 +138,12 @@ class UserController < ApplicationController
if current_user.theme.save
flash[:success] = 'Theme saved.'
else
flash[:error] = 'Theme saving failed. ' + current_user.theme.errors.messages.values.flatten.join(' ')
flash[:error] = 'Theme saving failed. ' + current_user.theme.errors.messages.flatten.join(' ')
end
elsif current_user.theme.update_attributes(update_attributes)
flash[:success] = 'Theme saved.'
else
flash[:error] = 'Theme saving failed. ' + current_user.theme.errors.messages.values.flatten.join(' ')
flash[:error] = 'Theme saving failed. ' + current_user.theme.errors.messages.flatten.join(' ')
end
redirect_to edit_user_theme_path
end