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:
commit
2d382df1f1
10 changed files with 50 additions and 24 deletions
|
|
@ -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!!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue