function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JashuganJashugan 

Uninitialized Constant Error in Rails

I get the following error:


uninitialized constant Product2


coming from the class_from_entity_name method in asf_adapter.rb

Here is my sf_product.rb:

class SfProduct < ActiveRecord::Base

set_table_name "Product2"
set_primary_key "id"
establish_connection "salesforce"

end


Here is my product.rb:

class Product < ActiveRecord::Base
end


I can get rid of this error by changing the sf_product.rb file to this:

class SfProduct < ActiveRecord::Base

set_table_name "Product2"
set_primary_key "id"
establish_connection "salesforce"

end

# for some reason this is needed
class Product2 < ActiveRecord::Base
end


Is there a reason that the Product2 class must exist at all? Is there any documentation on ActiveSalesforce other than the README file?

Message Edited by Jashugan on 08-24-2007 10:15 AM