heroku/databasedotcom — pull request #68 by ejholmes (2012-03-14 00:53:38+00:00)
Title: Support dependent picklists

Re-opening this after a couple tweaks.

Say we have an sObject with two picklist fields: `Cars` and `Colors`. The `Colors` field depends on the value of the `Cars` field. We could setup a field dependency like:

Cars
Ferrari
Lamborghini
Porsche

Colors
x Red
Red
Red

Blue
x Blue
Blue

Yellow
x Yellow
Yellow

Black
Black
x Black

This PR allows you to get the picklist values that are only valid for the controlling picklist value. For example, if I wanted to get the valid colors for a Lamborghini:

```ruby
client.picklist_values('Colors', :valid_for => 'Lamborghini')
# => [{"value" => "Blue", ...}, {"value" => "Yellow", ...}]
```