EqualPayChallengeHeinz/equalpay_webapp — pull request #1 by daguar (2012-03-14 00:41:48+00:00)
Title: Added Blsjob model and a rake task to load the data

CAUTION: Check first to see if you can access Blsmodel in Rails before running the rake task, or you might accidentally double-load the data

Example usage:

1.9.3-p125 :010 > Blsjob.find_by_bls_job_code('1.0.0.0')
=> #

1.9.3-p125 :011 > Blsjob.find_by_bls_job_code('1.0.0.0').earnings_men
=> 1256

Also added a rake task to load the BLS data into the database (model).

First, run the migration to create the table
rake db:migrate

Then, while in /equalpay_webapp, type
rake load_blsdata:doitnow

Ta da! You now have access to the BLS jobs data via Blsmodel.

To drop that table, simply do this:
rake db:rollback