We have to do an integration with Saleforce for a Rails project we are working on. I keep getting this error:
The :dependent option expects either :destroy or :delete (:nullify)
I posted to the Salesforce forums and didn't get any response so I did some more investigation. Turns out there is a bug and a patch:
http://rubyforge.org/tracker/index.php?func=detail&aid=19960&group_id=1201&atid=4729
Lucky for me the latest version of Rails has a feature that unpacks all of your gems into your vendor directory. I unpacked activesalesforce, made the code changes by applying the patch (which just removes :dependent => :nullify) and viola.
Tags: activesalesforce · bugs · helps · Ruby On Rails · Salesforce · tips4 Comments











4 responses so far ↓
Thanks for the post I really appreciate it. Did you get the GEM to unpack successfully?
rake gems:unpack GEM=activerecord-activesalesforce-adapter outputs nothing for me.
Be sure to add this code:
config.gem 'activerecord-activesalesforce-adapter', :lib => 'active_record', :version => '2.0.0'
inside of
Rails::Initializer.run do |config|
in the environment.rb file.
Hi Justin,
I have applied the patch and added a gemspec
http://github.com/luigi/activerecord-activesalesforce-adapter/tree/master
regards
Senthil
This is great to hear. Thanks for updating the gem.