🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.ruby
Article #248

Re: Czy ActiveRecord jest logiczny?

#248
From: Jaroslaw Zabiello
Date: Fri, 20 Oct 2006 13:17
17 lines
1190 bytes
Kolejny błąd w implementacji AR:

model:
class MojaTabela < ApplicationController
  set_table_name "tabela_o_nietypowej_nazwie"
  set_primary_key "NietypowyPrimaryKey"
end

kontroler:
...
MojaTabela.find(1) wywala wyjątek, bo zakłada, że klucz główny nazywa
się... ID. To po kiego ustawiałem set_primary_key() aby teraz to było
olewane?

-- 
Jarosław Zabiełło
http://blog.zabiello.com
Technical Details
Message-ID: <1d79bjohl2bpi.dju9umltjch.dlg@40tude.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <cxh2344pr5ob$.1uuphognwvje6$.dlg@40tude.net>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: Jaroslaw Zabiello <hipertracker@gmail.com>
Newsgroups: pl.comp.lang.ruby
Subject: Re: Czy ActiveRecord jest logiczny?
Date: Fri, 20 Oct 2006 14:17:56 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 17
Message-ID: <1d79bjohl2bpi.dju9umltjch.dlg@40tude.net>
References: <cxh2344pr5ob$.1uuphognwvje6$.dlg@40tude.net>
NNTP-Posting-Host: 82.195.148.233
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1161350299 4020 82.195.148.233 (20 Oct 2006 13:18:19 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Fri, 20 Oct 2006 13:18:19 +0000 (UTC)
X-User: newsgate2006
User-Agent: 40tude_Dialog/2.0.15.1pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit