added etags on prepare_for_display items and menuitems

This commit is contained in:
Senad Uka
2015-06-20 05:06:32 +02:00
parent 71c504cb5f
commit baf1617053
5 changed files with 16 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
def prepare_items_for_mass_display(items)
items.to_json(
items_json = items.to_json(
:except => [:created_at, :current_input_price, :stock, :on_display],
:include => [
:unit ,
@@ -7,6 +7,8 @@ def prepare_items_for_mass_display(items)
:sub_category,
:brand
])
etag xxhash(items_json)
items_json
end
def offset_and_limit_invalid?(offset, limit)