Ruby on Rails
Tuesday, June 5, 2012
On 5 June 2012 23:01, cyber c. <lists@ruby-forum.com> wrote:
Hi Jeremy,
Thanks for the reply.
I want to populate my DB during init one time by crawling through a set
of directories with filenames and paths. How do i do this?
Where, or how?
Where: db/seeds.rb
How: Iterate through directories (read the Dir/File/Path classes' documentation) and create a record in the database for each. If either of those steps seem too complex then you need to read some tutorials on Ruby (for the first bit) and Rails (for the later).
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment