Don't redirect ajax requests to getting_started

This commit is contained in:
Raphael Sofaer 2011-03-30 17:02:01 -07:00
parent 5a9ec82597
commit 1df287b2bb

View file

@ -62,8 +62,13 @@ class AspectsController < ApplicationController
respond_with @aspect
end
else
flash[:error] = I18n.t('aspects.create.failure')
redirect_to :back
respond_to do |format|
format.js { render :text => I18n.t('aspects.create.failure'), :status => 422 }
format.html do
flash[:error] = I18n.t('aspects.create.failure')
redirect_to :back
end
end
end
end