database - Rails/Active Record - I'm not sure of what to do with data that is innate to my application rather than user-provided -


i realize title sounds little confusing. can clarify.

suppose have static product category information (e.g., category titles such "tvs," "computers," "cell phones," etc.). these aren't user-submitted data; these categories exist default within database. maybe each category (or category record, since we're talking databases) has both name , description property. this, again, exists default within site, i'd have enter these values manually.

no problem.

what's bit confusing me how go adding database it's there, if, during development of application, need work across multiple computers , need provide each computer access same default data. also, once application in production, default data need present, too.

i hope clear , not clumsily worded. basically, want know how seed database data, not testing in development use in production. realize rails has seed.rb, i've heard that used merely stub data. need figure out how seed database real , how pull down copy of pull down code github.

all right. did more searching, , answers here: http://railscasts.com/episodes/179-seed-data


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -