On 10-10-21 07:23 AM, Ray Ray wrote:
Hey fellows,
ive running a ror 3 + 1.87 app with 2 models. In one of them i want to
have a start value of a string-object (f.e. "User".Object is default
named to "Ray"), which should be saved as ID 1. That means if i would
set up the database, then i automatically got that Object User with
value "Ray" and ID 1. So how can i realize this?
create a rake task to seed the database, which you can run after your
migration. here is a railscasts video:
http://railscasts.com/episodes/179-seed-data
--
Kind Regards,
Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely
GNU/Linux: 2.6.35-22-generic
Kubuntu x86_64 10.10 | KDE 4.5.1
Ruby 1.9.2p0 | Rails 3.0.1
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.