added slightly better error message on aspect update failure
This commit is contained in:
parent
f659ba58ef
commit
1f8f07f48d
2 changed files with 5 additions and 3 deletions
|
|
@ -83,9 +83,10 @@ class AspectsController < ApplicationController
|
|||
|
||||
def update
|
||||
@aspect = current_user.aspect_by_id(params[:id])
|
||||
|
||||
@aspect.update_attributes( params[:aspect] )
|
||||
flash[:notice] = I18n.t 'aspects.update.success',:name => @aspect.name
|
||||
if @aspect.update_attributes( params[:aspect] )
|
||||
flash[:notice] = I18n.t 'aspects.update.success',:name => @aspect.name
|
||||
else
|
||||
flash[:notice] = I18n.t 'aspects.update.failure',:name => @aspect.name
|
||||
respond_with @aspect
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ en:
|
|||
success: "%{name} was successfully removed."
|
||||
update:
|
||||
success: "Your aspect, %{name}, has been successfully edited."
|
||||
failure: "Your aspect, %{name}, had too long name to be saved."
|
||||
move_contact:
|
||||
failure: "didn't work %{inspect}"
|
||||
success: "Person moved to new aspect"
|
||||
|
|
|
|||
Loading…
Reference in a new issue