Hello all. So, I have started my first Rails app and I am somewhat overwhelmed with all of the unknowns that I am dealing with. I have generated my models, in this case a Company and Industry model. Companies belong to an industry, industries have many companies. So far, so good. How can I interactively test these items and have the interactive shell know where to find my classes? I am on Windows... Best, Mike Pence _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
You''re lucky, rails provides something like that built in Go into the dir of your rails app using the command line, then type: ruby script\console Then do stuff like: company = Company.new company.industry = Industry.new company.industry.name = ''Automotive'' company.name = ''Volvo'' company.save cheers, rob
Mike, You can use the Rails console: http://wiki.rubyonrails.com/rails/pages/Console Cody On 10/15/05, Mike Pence <mike.pence-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello all. So, I have started my first Rails app and I am somewhat > overwhelmed with all of the unknowns that I am dealing with. > > I have generated my models, in this case a Company and Industry model. > Companies belong to an industry, industries have many companies. So far, so > good. > > How can I interactively test these items and have the interactive shell > know where to find my classes? I am on Windows... > > Best, > Mike Pence > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >