Move StockChanges#index to StockArticles#history

This commit is contained in:
Julius 2013-07-13 09:32:27 +02:00
parent edaf91b029
commit 730dc7cf2a
7 changed files with 25 additions and 30 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