검색결과 리스트
글
테이블 명명규칙
IT(Old)/RubyOnRails-Tip
2008. 1. 21. 09:47
rails에서는
테이블명에는 복수형을(끝에 s붙임)
모델은 단수형을 사용한다.
그래야...자동으로 테이블 일대일매핑이 가능하다.
ㅡ.ㅡ
설정
트랙백
댓글
글
글
my sql DB config(database.yml)
IT(Old)/RubyOnRails-Tip
2008. 1. 21. 09:30
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: mysql
database: test
username: root
password: xxxxx
encoding: utf8
# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
adapter: mysql
database: test
username: root
password: xxxxx
encoding: utf8
production:
adapter: mysql
database: test
username: root
password: xxxxx
encoding: utf8