Make stock_changes readonly in index view
This commit is contained in:
parent
de9541a0df
commit
ffcb9490c9
1 changed files with 1 additions and 1 deletions
|
@ -3,6 +3,6 @@ class StockChangesController < ApplicationController
|
|||
before_filter :find_stock_article
|
||||
|
||||
def index
|
||||
@stock_changes = @stock_article.stock_changes(:readonly => true).order('stock_changes.created_at DESC') # The readonly has no effect, what is the proper way to achieve that?
|
||||
@stock_changes = @stock_article.stock_changes.order('stock_changes.created_at DESC').each {|s| s.readonly!}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue