Skip to content
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

Conversation

singpolyma
Copy link

Fixes #269

@@ -31,7 +31,7 @@ def link_to_add(*args, &block)

options[:class] = [options[:class], "add_nested_fields"].compact.join(" ")
options["data-association"] = association
options["data-blueprint-id"] = fields_blueprint_id = fields_blueprint_id_for(association)
options["data-blueprint-id"] = fields_blueprint_id = fields_blueprint_id_for(options[:blueprint] || association)
args << (options.delete(:href) || "javascript:void(0)")
args << options

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 41 needs to be

block, options = @fields[fields_blueprint_id_for(association)].values_at(:block, :options)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those options not going to be associated with the custom blueprint name when it is set?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Associations with more than one add-link (initialization model)
2 participants