Merge pull request #150 from foodcoop-rostock/stock_article_quantity_history

Show StockChanges index
This commit is contained in:
wvengen 2013-07-13 03:16:31 -07:00
commit 126f7e7459
10 changed files with 68 additions and 1 deletions

View file

@ -55,4 +55,9 @@ class StockitController < ApplicationController
render :partial => 'form', :locals => {:stock_article => stock_article}
end
def history
@stock_article = StockArticle.undeleted.find(params[:stock_article_id])
@stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC').each {|s| s.readonly!}
end
end