Skip to content

Commit

Permalink
fix create new button for subform inside subform
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed Jun 13, 2017
1 parent e0ee6ed commit bbdb499
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/active_scaffold/helpers/controller_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit bbdb499

Please sign in to comment.