jackcallister / job-snapper

0 stars 0 forks source link

Confusion over has_one and foreign keys in Job #18

Closed joshmcarthur closed 11 years ago

joshmcarthur commented 11 years ago

@jarsbe,

I was going to fix this myself, but I think it's probably part of a wider issue you should take a look at.

If you take a look at db/schema.rb#jobs alongside the Job model, you'll see that the associations are a little funky - there are some ID columns that are there that shouldn't be, some associations that have the wrong type, and some associations that should have an ID column that don't.

Have a look anyway, and I'm happy to talk about it tomorrow.

joshmcarthur commented 11 years ago

@jarsbe this is blocking me right now due to the DB constraints on keys that expect to be there but aren't. It's no big deal, I'll just take a look at searching instead.

jackcallister commented 11 years ago

@joshmcarthur, you're completely right with removing category_id and type_id. Happy to discuss anything tomorrow if you're uncomfortable clearing it up. As for Addresify (feel free to rename that!) the relevant model must have a region but not necessarily a city.

joshmcarthur commented 11 years ago

Closed by f966f60af5fa1d5a567ec1e39abc4ecd6dfc3b49