search for: regions_url

Displaying 1 result from an estimated 1 matches for "regions_url".

2009 Apr 02
3
error_messages_for does not display the error
...e is what I did: in the controller I modified the destroy method like this def destroy @region = Region.find(params[:id]) @region.destroy @region.errors.each_full{|msg| flash[:error] = msg } unless @region.errors.count == 0 respond_to do |format| format.html { redirect_to(regions_url) } format.xml { head :ok } end end I know, it''s an horror, I can name many resons why including the fact that only the last error is displayed, but could not figure out a better way. I''m pretty sure that the solution is right in front of me but cannot find it.... An...