Topic: question about scaffolds - Are there set scaffolds?

Hi

Hi I am a new ROR user and I love it.

I can not believe how far OOP has come since I was using Delphi 5.

I have question about scaffolds?

Are there set scaffolds?

Last night I was doing a tutorial that created a scaffold user, at first I thought the when I go:

script/generate scaffold user ...........

It greates a scafold called "user" because I called it user then it just created what ever boxes etc I asked it to make.

But then I noticed that it created a form called "users" not "user" so then I was wondering if I was infact calling a template made by someone else that contained a form called "users"

Are there a set numer of templates scaffolds or do I greate the scaffold from scratch when I generate it?

Re: question about scaffolds - Are there set scaffolds?

http://guides.rails.info/getting_starte … caffolding

Re: question about scaffolds - Are there set scaffolds?

base2aau wrote:

But then I noticed that it created a form called "users" not "user" so then I was wondering if I was infact calling a template made by someone else that contained a form called "users"

no it tries its best to pluralize things for you. the general thinking is that a model should be singular and a controller should be plural, there are a few gotchas to this like 'sheep' and so on, but for the most part it works. it will even put 'ies' on the end of most things that need it.

but tbh I think once most people get to grips with rails they stop using scaffolds.

--

Re: question about scaffolds - Are there set scaffolds?

BasicMind wrote:

but tbh I think once most people get to grips with rails they stop using scaffolds.

Some do, some don't. I still use scaffolds all the time, but I always mod the code it creates.

Re: question about scaffolds - Are there set scaffolds?

ok Thanks I think i can understand now.  Wow it is so clever.

Just one more question about scaffolds.

I know there is Text Strig and booleen.

is there a link to a site that will show me what other types of data entry items I can put in my scaffolds?

Re: question about scaffolds - Are there set scaffolds?

http://www.orthogonalthought.com/blog/i … datatypes/