Merge remote-tracking branch 'bennibu/rails3' into rails3

Conflicts:
	app/assets/stylesheets/bootstrap_and_overrides.css.less
	app/controllers/stockit_controller.rb
	app/models/ordergroup.rb
	app/models/workgroup.rb
	app/views/stockit/index.html.haml
This commit is contained in:
wvengen 2013-03-06 01:01:12 +01:00
commit 2d382df1f1
10 changed files with 50 additions and 24 deletions

View file

@ -32,11 +32,12 @@ class StockitController < ApplicationController
end
def destroy
StockArticle.find(params[:id]).destroy
redirect_to stock_articles_path
@article = StockArticle.find(params[:id])
@article.destroy
render :layout => false
rescue => error
flash[:error] = I18n.t('errors.general_msg', :msg => error.message)
redirect_to stock_articles_path
render :partial => "destroy_fail", :layout => false,
:locals => { :fail_msg => I18n.t('errors.general_msg', :msg => error.message) }
end
#TODO: Fix this!!