-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #18: by including a reference to a collections parent_id if pre… #19
base: master
Are you sure you want to change the base?
Conversation
…unt camelcased classes.
…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 |
There was a problem hiding this comment.
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
?
@tspacek could I get your thoughts on this? |
Looks reasonable. |
@@ -87,6 +88,12 @@ def update_row_resource(resource, params) | |||
resource.save | |||
end | |||
|
|||
def build_row_resource | |||
resource = end_of_association_chain.new |
There was a problem hiding this comment.
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.
…sent