From e21d45bd667262b133827c9c837fa3646b755580 Mon Sep 17 00:00:00 2001 From: taca Date: Wed, 23 Mar 2011 14:48:12 +0000 Subject: Update ruby-activerecord3 package to 3.0.5. *Rails 3.0.5 (unreleased)* * Model.where(:column => 1).where(:column => 2) will always produce an AND query. [Aaron Patterson] * Deprecated support for interpolated association conditions in the form of :conditions => 'foo = #{bar}'. Instead, you should use a proc, like so: Before: has_many :things, :conditions => 'foo = #{bar}' After: has_many :things, :conditions => proc { "foo = #{bar}" } Inside the proc, 'self' is the object which is the owner of the association, unless you are eager loading the association, in which case 'self' is the class which the association is within. You can have any "normal" conditions inside the proc, so the following will work too: has_many :things, :conditions => proc { ["foo = ?", bar] } Previously :insert_sql and :delete_sql on has_and_belongs_to_many association allowed you to call 'record' to get the record being inserted or deleted. This is now passed as an argument to the proc. [Jon Leighton] --- databases/ruby-activerecord3/Makefile | 10 ++++++---- databases/ruby-activerecord3/distinfo | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/databases/ruby-activerecord3/Makefile b/databases/ruby-activerecord3/Makefile index 7f5a733891c..542e8714bae 100644 --- a/databases/ruby-activerecord3/Makefile +++ b/databases/ruby-activerecord3/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2011/02/09 13:00:07 taca Exp $ +# $NetBSD: Makefile,v 1.4 2011/03/23 14:48:12 taca Exp $ -DISTNAME= activerecord-3.0.4 +DISTNAME= activerecord-${RUBY_RAILS3_VERSION} CATEGORIES= databases MAINTAINER= pkgsrc-users@NetBSD.org @@ -8,8 +8,10 @@ HOMEPAGE= http://www.rubyonrails.org/ COMMENT= Object-relational mapper framework LICENSE= mit -DEPENDS+= ${RUBY_PKGPREFIX}-activesupport>=3.0.4<3.0.5:../../devel/ruby-activesupport3 -DEPENDS+= ${RUBY_PKGPREFIX}-activemodel>=3.0.4<3.0.5:../../devel/ruby-activemodel +RUBY_RAILS= 3 + +DEPENDS+= ${RUBY_ACTIVESUPPORT_DEPENDS} +DEPENDS+= ${RUBY_ACTIVEMODEL_DEPENDS} DEPENDS+= ${RUBY_PKGPREFIX}-arel>=2.0.2<2.1:../../databases/ruby-arel DEPENDS+= ${RUBY_PKGPREFIX}-tzinfo>=0.3.23<0.4:../../time/ruby-tzinfo diff --git a/databases/ruby-activerecord3/distinfo b/databases/ruby-activerecord3/distinfo index 9057f7a306c..abfcf2887a2 100644 --- a/databases/ruby-activerecord3/distinfo +++ b/databases/ruby-activerecord3/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.3 2011/02/09 13:00:07 taca Exp $ +$NetBSD: distinfo,v 1.4 2011/03/23 14:48:12 taca Exp $ -SHA1 (activerecord-3.0.4.gem) = f0ccada73a3230b2e31730952ba3d5a3a012c819 -RMD160 (activerecord-3.0.4.gem) = 4f30e7f5a757eeb63c3d62086e1ee7e187a5cf30 -Size (activerecord-3.0.4.gem) = 341504 bytes +SHA1 (activerecord-3.0.5.gem) = 33dd05d7362931564f6f15ea7130cc27a5fc09e8 +RMD160 (activerecord-3.0.5.gem) = 0f04f25e878771945af659588a0900e7c1767c5a +Size (activerecord-3.0.5.gem) = 342528 bytes -- cgit v1.2.3