[Rails] Re: how does the controller "know" about the model?

2010-08-20 Thread tuti plain
Hi, I'm a Rails newbie myself, but I think that all required .rb files are automatically required when you boot up your app by invoking "script/server". This probably done in either boot.rb or environment.rb. If you didn't know, you can invoke "script/console" and create objects from your

[Rails] The M in ORM

2010-08-20 Thread tuti plain
Hi everyone, I am attempting to connect an already existing mysql database with Rails. For This I can't use the traditional "generate scaffold" and "rake db:migrate" because (I think), I'll loose the data already existing in that database table. So what I did was, I generated a scaffold for m

[Rails] Re: "Missing Template" when manually creating views

2010-03-22 Thread tuti plain
Hi, Thanks, you were right, renaming the folder solved the problem. I think I'll never fully understand the plurals and singulars in Rails. What I don't get is why the scaffolded model has its views named like .html.erb but my manually created one has to be .erb only. I have no problem in

[Rails] "Missing Template" when manually creating views

2010-03-21 Thread tuti plain
Hi everyone, I am trying to set up a controller and a view manually, without the aid of scaffolding (though I am using a scaffolded model as reference). I have set up my controller like this: class RecetasController < ApplicationController def index respond_to do |format| format.h

[Rails] Newbie RESTful routing problem, please help!

2010-02-16 Thread tuti plain
Hello, on my last post a few weeks ago, all who replied seemed to agree that the problem I was having was in my routing configuration. I decided to read up a bit on rails routing using this article: http://guides.rails.info/routing.html I decided to try what the article calls RESTful routing. So

[Rails] Re: What happened to CoC?

2010-02-09 Thread tuti plain
> I have a version of the book with something that looks like a circular > stamp on the cover that says "Covers Rails 2.0", so I guess it has > been updated. ;) > > And I would have to agree with Marnen. It looks like you have a > routing issue. > > Cheers. Mine has it, too. The author clarif

[Rails] Re: What happened to CoC?

2010-02-08 Thread tuti plain
> I am not exactly sure what is meant by CoC, Continuity of Code? CoC means "convention over configuration", which is supposed to be one of Rails' founding philosophies. > if you are determined to play along with an outdated book that uses an > outdated version of Rails, you might consider insta

[Rails] What happened to CoC?

2010-02-07 Thread tuti plain
Hi everyone, First I want to begin by saying I am a total newbie when it comes to Rails. I am reading Obie Fernandez's The Rails Way, but I have a question about something he says. He says that if I have a controller like this: class DemoController < ApplicationController def index end en

[Rails] Newbie questions

2009-12-21 Thread tuti plain
Hi all, I am new to Rails, and I have a few questions about it. I've done a few tutorials, up to generating a scaffold using SQLite and inserting some data. 1. Must I always create my tables using rake db:migrate? Or is it possible to create a model using an existing table on an already exist