rapid7/metasploit_data_models — pull request #72 by lsanchez-r7 (2014-07-17 02:50:27+00:00)
Title: Feature/msp 9842/arel helper

# Verification Steps

- [ ] `bundle install`

## `rake spec`
- [ ] `rake spec`
- [ ] VERIFY no failures
- [ ] open the rails console `cd spec/dummy`
- [ ] run `rails console`
- [ ] `puts Mdm::Host.joins(Mdm::Host.join_association(:services)).to_sql` should output
SELECT "hosts".* FROM "hosts" INNER JOIN "services" ON "services"."host_id" = "hosts"."id"
- [ ] lets test something weird. run `puts Mdm::Host.joins(Mdm::Host.join_association(:services, Arel::Nodes::OuterJoin)).select(Mdm::Service[Arel.star]).to_sql`
it should output
`SELECT "services".* FROM "hosts" LEFT OUTER JOIN "services" ON "services"."host_id" = "hosts"."id"`