Refactoring of articles and article_categories. articles are now a nested resource of supplier.
This commit is contained in:
parent
b38025869a
commit
936e6ef69a
36 changed files with 597 additions and 589 deletions
|
|
@ -4,4 +4,11 @@ module ArticlesHelper
|
|||
def highlight_new(unequal_attributes, attribute)
|
||||
unequal_attributes.detect {|a| a == attribute} ? "background-color: yellow" : ""
|
||||
end
|
||||
|
||||
def row_classes(article)
|
||||
classes = ""
|
||||
classes += ' unavailable' if article.availability
|
||||
classes += " just_updated" if @article.recently_updated && @article.availability
|
||||
classes
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue