activesalesforce 0.5.1 → 0.5.2

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 +5 -7
  2. metadata +2 -2
data/lib/asf_adapter.rb CHANGED
@@ -105,7 +105,7 @@ module ActiveRecord
105
105
 
106
106
  MAX_BOXCAR_SIZE = 200
107
107
 
108
- attr_accessor :batch_size, :auto_create_stubs
108
+ attr_accessor :batch_size
109
109
  attr_reader :entity_def_map, :keyprefix_to_entity_def_map, :config, :class_to_entity_map
110
110
 
111
111
  def initialize(connection, logger, connection_options, config)
@@ -118,8 +118,6 @@ module ActiveRecord
118
118
 
119
119
  @command_boxcar = []
120
120
  @class_to_entity_map = {}
121
-
122
- @auto_create_stubs = false
123
121
  end
124
122
 
125
123
 
@@ -591,8 +589,11 @@ module ActiveRecord
591
589
 
592
590
  begin
593
591
  referenced_klass = class_from_entity_name(reference_to)
592
+
593
+ # Verify that we found an ActiveRecord descendant that uses the SalesforceAdapter
594
+ referenced_klass = nil unless referenced_klass.connection.is_a?(SalesforceAdapter)
595
+
594
596
  rescue NameError => e
595
- if auto_create_stubs
596
597
  # Automatically create a least a stub for the referenced entity
597
598
  @logger.debug(" Creating ActiveRecord stub for the referenced entity '#{reference_to}'")
598
599
 
@@ -600,9 +601,6 @@ module ActiveRecord
600
601
 
601
602
  # Automatically inherit the connection from the referencee
602
603
  referenced_klass.connection = klass.connection
603
-
604
- # configure_active_record(get_entity_def(reference_to))
605
- end
606
604
  end
607
605
 
608
606
  if referenced_klass
metadata CHANGED
@@ -3,8 +3,8 @@ 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.1
7
- date: 2006-04-13 00:00:00 -04:00
6
+ version: 0.5.2
7
+ date: 2006-04-20 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:
10
10
  - lib