activesalesforce 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/asf_adapter.rb +7 -1
  2. metadata +1 -1
data/lib/asf_adapter.rb CHANGED
@@ -258,7 +258,13 @@ module ActiveRecord
258
258
  column_names = columns.map { |column| column.api_name }
259
259
 
260
260
  # Check for SELECT COUNT(*) FROM query
261
- selectCountMatch = sql.match(/SELECT\s+COUNT\(\*\)\s+FROM/i)
261
+
262
+ # Rails 1.1
263
+ selectCountMatch = sql.match(/SELECT\s+COUNT\(\*\)\s+AS\s+count_all\s+FROM/i)
264
+
265
+ # Rails 1.0
266
+ selectCountMatch = sql.match(/SELECT\s+COUNT\(\*\)\s+FROM/i) unless selectCountMatch
267
+
262
268
  if selectCountMatch
263
269
  soql = "SELECT id FROM#{selectCountMatch.post_match}"
264
270
  else
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: activesalesforce
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.5
6
+ version: 0.5.6
7
7
  date: 2006-05-04 00:00:00 -04:00
8
8
  summary: ActiveSalesforce (ASF) is a Rails connection adapter that provides direct access to Salesforce.com hosted data and metadata via the ActiveRecord model layer. Objects, fields, and relationships are all auto surfaced as active record attributes and rels.
9
9
  require_paths: