Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

An ActiveRecord adapter for the API

branch: master

This branch is 0 commits ahead and 0 commits behind master

== Updates

Now works with ruby 1.9.2

== Welcome to Active Salesforce

ActiveSalesforce is an extension to the Rails Framework that allows for the dynamic creation and management of ActiveRecord objects through the use of Salesforce meta-data and uses a organization as the backing store.

== Getting started

1. Edit config/environment.rb and add a config.gem requirement: do |config|
      config.gem "activerecord-activesalesforce-adapter19", :lib => 'activerecord-activesalesforce-adapter'

2. Edit database.yml

      adapter: activesalesforce
      username: <salesforce user name goes here>
      password: <salesforce password goes here>

    NOTE: If you want to access your Salesforce Sandbox account use as your url instead.

3. Create your salesforce models using a Salesforce::<ModelName> namespace.

    script/generate model Salesforce::Contact

4. Run a quick test to make sure things are working

    > script/console
    Loading development environment (Rails 2.3.3)
    >> Salesforce::Contact.first
    => <Salesforce::Contact id: "003T000000GqvJsIAJ", ... >

5. Proceed using standard Rails development techniques!

== Advanced Features

1. Session ID based Authentication: Add the following to /app/controllers/application.rb to enable SID auth for all controllers

   class ApplicationController < ActionController::Base
     before_filter ActiveSalesforce::SessionIDAuthenticationFilter

2. Boxcar'ing of updates, inserts, and deletes. Use <YourModel>.transaction() to demark boxcar boundaries.

== Description of contents

 Application specific libraries. Basically, any kind of custom code that doesn't
 belong under controllers, models, or helpers. This directory is in the load path.

 Helper scripts for automation and generation.

 Unit and functional tests along with fixtures.

Something went wrong with that request. Please try again.