0
PHP 응용 프로그램을 Rails로 변환하고 기존 db를 사용하고 있습니다. 나는 레일에 새로운 하드 다음 모델에 대한 시간 (규칙 및 명명) 올바른 협회와 함께 오는 데 : 나는 쉽게 플레이어를 연결할 수있어 및 모델 통계기존 데이터베이스에 대한 ActiveRecord 연관
baseball_players (one record per player)
id, first_name, last_name, etc
baseball_stats (multiple records per player)
player_id, year, position_id
baseball_positions (unique position names and id: a lookup table)
id, position_name
baseball_players_positions (multiple player positions per player)
player_id, year, position_id
을,하지만 난 ' 그들과 함께 행운이없는 m.
어떤 도움말이나 도움을 주시면 감사하겠습니다.
감사 페드로 :
당신이applicarion.rb
파일에 다음 코드를 삽입 할 수있는 활성 레코드를 구성합니다. 접두어를 추가하기 위해 ActiveRecord를 구성 할 수 있는지 알지 못했습니다. 나는 내일 그 기회를 줄 것이다. 그러나 나는 나의 문제 였다고 느낀다. – relyt