One of the most frustrating things that I’ve had to experience with Ruby on Rails is when things almost work.
Like this morning. I’ve been trying for the last few hours to get an INNER JOIN of two tables to work correctly.
After a lot of reading and trying things that didn’t work I finally stumbled on the truth. Or at least part of the truth.
The INNER JOIN worked in that I was able to search for something in one table and have the table that was connected to it, via a foreign key, show up in my search results.
In other words, I have a Wildfire App that has two tables. One is for locations and the other is for the individual wildfires. Each wildfire will have one location assigned to it. This location is stored on the wildfires table in the form of a foreign key that corresponds to a location id on the locations table.
Now if I want to be able to view the wildfires that are in a particular state I need to do a table join and be able to query on locations.state.
At any rate… using the Rails helper to join tables I’m able to search based on state and am returned with all the fires that are in that state. The problem is that the location doesn’t seem to come along with it.
I’m certain it is a simple problem. It almost always is.
But its one of the frustrations of development… because it works. Sort of.
Here’s hoping that I can figure it out in the next hour before class starts.
In Other News
I mentioned a few things the other week about how important friends and family are to me.
Last night was pretty special… I was able to sit down and eat supper with Eric and Joanne, my brother in law and sister.
They are in town for a couple of days while she has surgery here in Atlanta. Hopefully I’ll be able to see them a number of times between now and when they head back home.
They also brought a number of things for me. Stuff that I had asked them to bring and stuff that I had no clue was coming, but am incredibly grateful for.
I am incredibly blessed.
Be nice to butterflies people!
That is all.