javascript translations and default format html

This commit is contained in:
2012-09-17 18:35:16 +02:00
parent 29848bb3cf
commit 2b2b81c23b
7 changed files with 75 additions and 15 deletions
+6
View File
@@ -201,6 +201,12 @@ class UserController < ApplicationController
def list_history
@lists = List.for_user(current_user, page: params[:page], per_page: params[:per_page].presence || 14)
@lists.include_relation(:supplier)
respond_to do |format|
format.html {}
format.json do
render json: @lists.inject(lists: [], current_page: @lists.current_page, num_pages: @lists.num_pages, total_count: @lists.total_count){|h, l| h[:lists] << l.as_json.merge(supplier_name: l.supplier.name); h}
end
end
end
##