Deliver objects with associations in index list (like it is on show).

This commit is contained in:
Martin Edenhofer 2016-03-14 14:34:35 +01:00
parent c27aee75eb
commit de56206045

View file

@ -378,7 +378,11 @@ class ApplicationController < ActionController::Base
def model_index_render (object, _params)
generic_objects = object.all
model_index_render_result(generic_objects)
generic_objects_with_associations = []
generic_objects.each {|item|
generic_objects_with_associations.push item.attributes_with_associations
}
model_index_render_result(generic_objects_with_associations)
rescue => e
logger.error e.message
logger.error e.backtrace.inspect