Hey Guys, I am attempting to develop an application for managing my company''s workflow doing visual effects for the TV/film industry. I have a few ruby on rails questions. 1. How can I create a new table in a database without using a migration? (I want to create a new table for every job we do - to keep track of all the versions of the effects and works in progress we do) 2. Is there anyway to browse directories/files on a server using rails? Any help is greatly appreciated! Cheers Adam -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Gawlowski
2008-Apr-16 03:32 UTC
Re: newbie questions - create table and file browser?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Adam Teale wrote: | 1. How can I create a new table in a database without using a migration? SQL. Exact details depend on the RDBMS you are going to use. | (I want to create a new table for every job we do - to keep track of all | the versions of the effects and works in progress we do) This is not a really well thought out idea. The amount of JOINs, UNIONs this invites is nasty, not to mention that it will be an administrative nightmare (glossing over the performance issues this might incur in production). That''s what has_many, has_one, belongs_to, belongs_to_many, etc.. are for, Rails'' (or rather ActiveRecord''s) relationship methods. Yes, you can do that with the many, many tables you''ll have, too, but every single table will need a controller at least, maybe even a model. Not to mention you''ll end up having to inherit from a base class for the models. Not very DRY, and not very YAGNI, either. Have fun maintaining the n+x controllers and possibly models, though. | 2. Is there anyway to browse directories/files on a server using rails? There should be. Ruby (the language Rails is written in) should allow for that, one way or another. - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan ~ I say, if your knees aren''t green by the end of the day, you ought to seriously re-examine your life. -- Calvin -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAkgFc0MACgkQbtAgaoJTgL8jhwCXfaSz6TwCYDPFdRnPETDsIsdm 0gCgp7nDTTEmnYqruYQM9uSkKeR9rH4=QGaI -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Phillip! Thanks for replying so quickly. It''s good to know so early on that I have the wrong approach to the tables! I''l read up on ActiveReord Cheers! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---