javascript translations and default format html
This commit is contained in:
@@ -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
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user