A set of helpers to make it easier to work with CloudConnect managed databases in rails.
Add this line to your application's Gemfile:
gem 'cloudconnect-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cloudconnect-rails
Include the CloudConnect
module in your ActiveRecord
models:
class Account < ActiveRecord::Base
include CloudConnect
end
Specify the field as a multipicklist field, which will properly serialize ruby arrays to the Salesforce storage format ('Ferrari;Toyota;Honda').
class Account < ActiveRecord::Base
include CloudConnect
multipicklist :Cars__c
end
account = Account.new(cars: ['Honda'])
account.reload
account.cars
# => ['Honda']
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request