Topic: Creating fields without using scaffold

Hi everyone,

Right i creating a sign on system and i have used the scaffold command to create a test signin with username and password and run the rake db:migrate which works perfectly fine. I am wondering when the scaffold command is issued with the fieldname:type what goes where i.e. i see the controller as same bits in it but what other files are used. I am aiming at seeing how this works and instead of using the scaffold command to create the fields i would like to just issue "rails generate scaffold Signin" and then create the field options manually and then run db:migrate to create the fields within the db.

Thanks

Last edited by paulie (2012-04-08 13:50:47)

Re: Creating fields without using scaffold

That would be

rails generate migration name_of_migration.

that will create

db/migrate/20120408XXXXXX_name_of_migration.rb

edit that to define your fields,  then run

rake db:migrate

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Creating fields without using scaffold

Thank you very much, sorry i have been a bit busy thats why the reply was later. Also saw that models are kind of to do with it as well.

Thanks again