Hello, I''ve got a got a question about how and where to load initial data that is necessary in order to make the website work (menu structure, page contents, ...) I know it''s preference and everybody can do it as s/he wants but I just wanna know if there''s any convention or something like that. First of all, how do I normally load necessary data as mentioned above? Put it in a fixture and load it while migrating or type it directly into the migration? Secondly what about data that is not needed to run the make the application work but makes my life easier (e.g. a user account so I don''t have to register myself each time after resetting the migrations)? Thanks, Hans -- Posted via http://www.ruby-forum.com/.
Another question about where it is supposed to be located conventionally: Where should I put translations? I found many different locations on the net... lib/locale? lib/locales? config/locale? config/locales? I just wanna stick to the "convention over configuration" thing, that''s why I''m asking. Is there any website that has alle these convention information by the way? Thanks -- Posted via http://www.ruby-forum.com/.
Heinz Strunk wrote:> Hello, > > I''ve got a got a question about how and where to load initial data that > is necessary in order to make the website work (menu structure, page > contents, ...) > > I know it''s preference and everybody can do it as s/he wants but I just > wanna know if there''s any convention or something like that. > > First of all, how do I normally load necessary data as mentioned above? > Put it in a fixture and load it while migrating or type it directly into > the migration?Data does not belong in migrations, and fixtures aren''t great for this either. I would advise loading it from a separate file. The Seed-Fu plugin might be helpful.> > Secondly what about data that is not needed to run the make the > application work but makes my life easier (e.g. a user account so I > don''t have to register myself each time after resetting the migrations)? >Same answer, I suppose.> Thanks, > HansBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.