ar-extensions 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2009-03-16 zdennis <zach.dennis@gmail.com>
2
+
3
+ * fixed Rails 2.3.1 and 2.3.2 compatibility issue (Stephen Heuer)
4
+
1
5
  2009-02-09 zdennis <zach.dennis@gmail.com>
2
6
 
3
7
  * fixed issue in http://zdennis.lighthouseapp.com/projects/14379/tickets/14-join-table-conditions-broken
data/README CHANGED
@@ -9,6 +9,12 @@ Email: zach.dennis@gmail.com
9
9
  - For How-To information see http://www.continuousthinking.com/tags/arext
10
10
  - For project information and feedback please consult http://rubyforge.org/projects/arext/
11
11
  - For release information please see below
12
+
13
+ ActiveRecord::Extensions 0.8.2
14
+ ------------------------------
15
+ March 16th, 2009
16
+ - Rails 2.3.1 and 2.3.2 compatibility added
17
+ - Rails 2.1.2 and 2.2.2 compatibility preserved
12
18
 
13
19
  AciveRecord::Extensions 0.7.0
14
20
  -----------------------------
data/lib/ar-extensions.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  begin ; require 'rubygems' rescue LoadError; end
2
2
  require 'active_record' # ActiveRecord loads the Benchmark library automatically
3
+ require 'active_record/version'
3
4
 
4
5
  require File.expand_path(File.join( File.dirname( __FILE__ ), '..', 'init.rb' ))
@@ -71,8 +71,14 @@ class ActiveRecord::Base
71
71
  else
72
72
  table_name = quoted_table_name
73
73
  end
74
-
75
- conditions << "#{table_name}.#{connection.quote_column_name(attr)} #{attribute_condition( val )} "
74
+
75
+ # ActiveRecord in 2.3.1 changed the method signature for
76
+ # the method attribute_condition
77
+ if ActiveRecord::VERSION::STRING < '2.3.1'
78
+ conditions << "#{table_name}.#{connection.quote_column_name(attr)} #{attribute_condition( val )} "
79
+ else
80
+ conditions << attribute_condition("#{table_name}.#{connection.quote_column_name(attr)}", val)
81
+ end
76
82
  values << val
77
83
  end
78
84
  end
@@ -2,7 +2,7 @@
2
2
  module ActiveRecord # :nodoc:
3
3
  module Extensions # :nodoc:
4
4
  module VERSION
5
- MAJOR, MINOR, REVISION = %W( 0 8 1 )
5
+ MAJOR, MINOR, REVISION = %W( 0 8 2 )
6
6
  STRING = [ MAJOR, MINOR, REVISION ].join( '.' )
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis
@@ -21,7 +21,7 @@ dependencies:
21
21
  requirements:
22
22
  - - ">="
23
23
  - !ruby/object:Gem::Version
24
- version: 2.0.2
24
+ version: 2.1.2
25
25
  version:
26
26
  description: Extends ActiveRecord functionality by adding better finder/query support, as well as supporting mass data import, foreign key, CSV and temporary tables
27
27
  email: zach.dennis@gmail.com