Deliver objects with associations in index list (like it is on show).
This commit is contained in:
parent
c27aee75eb
commit
de56206045
1 changed files with 5 additions and 1 deletions
|
@ -378,7 +378,11 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def model_index_render (object, _params)
|
def model_index_render (object, _params)
|
||||||
generic_objects = object.all
|
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
|
rescue => e
|
||||||
logger.error e.message
|
logger.error e.message
|
||||||
logger.error e.backtrace.inspect
|
logger.error e.backtrace.inspect
|
||||||
|
|
Loading…
Reference in a new issue