Skip to content
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

groupings to replace children #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

groupings to replace children #64

wants to merge 1 commit into from

Conversation

s12chung
Copy link
Contributor

@s12chung s12chung commented Jun 1, 2016

proposal because the children code is kinda confusing. and we have a hack: https://github.com/FinalCAD/finalcloud/blob/e2ba5e9a1727483dd86811e4865e0e733123df26/build/core/row_models/export/library_export_row.rb#L14-L21

making this feature made me think of having a Column class that represents each column instead of holding hashes. only an idea, since import/attributes is becoming a bit messy.

@s12chung s12chung changed the title change readme for groupings to replace children groupings to replace children Jun 1, 2016
file = CsvRowModel::Import::File.new(file_path, GroupedColumnImportModel)
file.next.attributes # => { names: ['abbey'], standard: '', tags: ['a', b'] }
file.next.attributes # => { names: ['bob'], standard: 'not_empty', tags: ['c'] } # does not group 'chris' because the `standard` cell is not empty
file.next.attributes # => { names: ['chris', 'dave'], standard: 'not_empty', tags: ['d', 'e'] }
Copy link
Contributor

Choose a reason for hiding this comment

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

Really weird case..... I don't see any case like that and our CSVs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

library :p (we're trying to replace children)

@joel
Copy link
Contributor

joel commented Jun 2, 2016

What about validations on those fields?

@s12chung
Copy link
Contributor Author

s12chung commented Jun 2, 2016

@joel validations are the same really, they just apply to the array

@s12chung s12chung mentioned this pull request Jun 9, 2016
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.

2 participants