Closed awmichel closed 11 years ago
@awmichel Can you include a test case for this change?
@awmichel Also, can you submit a new commit without the whitespace changes?
@synewaves Added a test case for the missing region data and updated the commits to not include the whitespace changes.
Should there be any additional helper for checking the region information on a result? Something like a has_region?
method? I considered this, but it's also easy enough to simply check if region or local_real_estate are nil.
This looks great. I don't know if we need to add the has_region? helper, since like you said, nil checks are pretty simple to do. If that will work, I''ll close this and merge it in.
Fine by me, go ahead and merge.
In some rare cases the region data for a property is empty and would cause the rubillow to throw a missing method error when attempting to read the region attributes. This fix verifies the region data exists before attempting to write it to the model.