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

No need for more then 1 db table #10

Open
kubenstein opened this issue Dec 2, 2013 · 2 comments
Open

No need for more then 1 db table #10

kubenstein opened this issue Dec 2, 2013 · 2 comments

Comments

@kubenstein
Copy link

I am wondering if we really need new table for each file in class? We can use only one table paperclip_database_files which will be in polymorphic association with active record model. cleaner solution imho, what do you think?

@jarl-dk
Copy link
Member

jarl-dk commented Dec 2, 2013

I don't see minimizing number of database tables as a goal by itself... But if it could simplify design and reduce code my ears are open. But I think I need a more detailed/specific proposal.

@kubenstein
Copy link
Author

On my fork I changed the code to store all attachments in one table, in my opinion the idea is much more simple now. Please take a look and share your opinion.

https://github.com/kubenstein/paperclip_database/compare/one_polymorphic_table

Integration tests are green. Had trouble to understand unit tests so for now they are still failing.

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

No branches or pull requests

2 participants