3 日坊主日記
2006-05-05 [長年日記]
_ [MySQL][Delphi] dbexpress driver for MySQL4.1 - getIndices fix
via mysql:12976
OpenDBXのMySQL driverに対する修正。
- Delphi6用パッチ (要IndexCursor.pas)
- Delphi6でビルドし直したバイナリ (dbxopenmysql41.dll)
IndexCursor.pasはMySQL5.0版からいただきます。
にんともかんとも。
[ツッコミを入れる]
2006-05-10 [長年日記]
_ [Rails] Rails Plugin
すごすぎるっ 感動した!
_ [Rails] DEPRECATED: push_with_attributes
HABTM の
collection.push_with_attributes(object, join_attributes)
これが DEPRECATED に [DHH] いよいよ rich HABTM は終焉か?
_ [Rails] has_many :through
has_many :through をお試し中。はまりまくり。
HABTM上のカラムの更新 (UpdateHabtmAttributes) が has_many :through で簡単に…はならない。
has_many :through でHABTM上のカラム (ってほんとは何て言えばいいんだろう…) を参照するとき、現時点では :select を使うトリックが必要。
- select => 'distinct *' にも罠がある。id がかぶるとまずい。
[ツッコミを入れる]
2006-05-14 [長年日記]
[ツッコミを入れる]
2006-05-29 [長年日記]
_ [Rails] auto_indexは:objectを見ない
Rails FormHelperの話。 Rails1.1からobjectはobject_nameとは別に:objectで指定できるので、 インスタンス変数に入れなくてよくなったんだけど、 auto_indexは:objectを見てくれないみたい。
こう書きたいんだけどなあ。
for book in @books
text_field("book[]", "name", :object => book)
end
仕方ないので未だこう書く。
for @book in @books
text_field("book[]", "name")
end
[ツッコミを入れる]
