Re: RoR how does scaffold work?
- From: Sammy Larbi <sam@xxxxxxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 23:44:57 +0900
anansi wrote, On 4/30/2007 9:40 AM:
Hi,I think generally, you'll want to use the migrations, as I think that works some magic on config files which the scaffold command may be looking for. For more info on migrations, see http://www.google.com/search?q=ruby+on+rails+migrations
I wanna write a little blog in ruby so I started with creating a mysql-db with blog_test, blog_development, blog_production. Then I created a new rails project with "rails blog". I create, in the folder db, a file create.sql with this content:
drop table if exists entrys;
create table entrys (
id int not null auto_increment,
headline varchar(100) not null,
news text not null,
primary key (id)
);
then I did:
mysql blog_development <db/create.sql
which works without problems. After that I changed /config/database.yml:
.
- Follow-Ups:
- Re: RoR how does scaffold work?
- From: anansi
- Re: RoR how does scaffold work?
- References:
- RoR how does scaffold work?
- From: anansi
- RoR how does scaffold work?
- Prev by Date: ruby and true
- Next by Date: Re: ruby and true
- Previous by thread: RoR how does scaffold work?
- Next by thread: Re: RoR how does scaffold work?
- Index(es):