Skip to content

Conversation

@dawilster
Copy link

…sent

dawilster and others added 6 commits March 21, 2016 17:34
…t/:parent_id/child.parent_id/import_csv explicitly requiring the parents id seems to fix it
…resource Class. This way admin resources they use belongs_to relations can build through the parent chain
…acks aren't supported we needed a way to tap the resource before it was saved.
…tive_admin_csv_import into fix/parent-collection-path
resource ||= build_row_resource

# controller before create callback
resource = before_create(resource) if respond_to? :before_create
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this happen as part of build_row_resource?

@dawilster
Copy link
Author

@tspacek could I get your thoughts on this?

@tspacek
Copy link
Member

tspacek commented Mar 23, 2016

Looks reasonable.

end

def build_row_resource
resource = end_of_association_chain.new
Copy link
Member

Choose a reason for hiding this comment

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

Does build work here instead of new? Might be a bit more idiomatic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants