codeforamerica/ohana-api — pull request #227 by monfresh (2014-09-09 14:45:10+00:00)
Title: Add support for searching on multiple languages.

Example:
[http://ohana-api-demo.herokuapp.com/api/search?language[]=Filipino%20(Ta
galog)&language[]=Hindi](http://ohana-api-demo.herokuapp.com/api/search?language[]=Filipino%20(Ta
galog)&language[]=Hindi)

This will return locations whose languages field contain either
“Filipino (Tagalog)” OR “Hindi”.

Run `bin/rake db:migrate` to update the DB. This PR converts the
`languages` field from text to the Postgres Array type.

If for some reason you want to rollback this DB change, you’ll first
need to add the following line in `app/models/location.rb`:
```
serialize :languages, Array
```
Then you can rollback:
```
bin/rake db:rollback
```
You’ll then need to update the `language` search method to its previous
query, and update `spec/api/search/language_spec.rb`.