From bbdb499470f784881e284627007eee46bb6f95c2 Mon Sep 17 00:00:00 2001 From: Sergio Cambra Date: Tue, 13 Jun 2017 16:14:10 +0200 Subject: [PATCH] fix create new button for subform inside subform --- lib/active_scaffold/helpers/controller_helpers.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/active_scaffold/helpers/controller_helpers.rb b/lib/active_scaffold/helpers/controller_helpers.rb index 22d6545f0b..48b321ab02 100644 --- a/lib/active_scaffold/helpers/controller_helpers.rb +++ b/lib/active_scaffold/helpers/controller_helpers.rb @@ -85,11 +85,7 @@ def nested_singular_association? end def main_form_controller - return unless params[:parent_controller] && subform_child_association - controller = parent_controller_name.constantize - column = controller.active_scaffold_config.columns[subform_child_association] if controller - return unless column - controller if column.association.klass.name == active_scaffold_config.model.name + parent_controller_name.constantize unless params[:parent_controller] end def render_parent?