Skip to content

Instantly share code, notes, and snippets.

@libryder
Created September 11, 2012 21:28
Show Gist options
  • Save libryder/3702208 to your computer and use it in GitHub Desktop.
Save libryder/3702208 to your computer and use it in GitHub Desktop.
def has_coords_for_client?(client)
client_area_location = client_are_location_for_client(client)
return true if self.has_coords? || (client_area_location.has_coords? if client_area_location)
return false
end
def client_area_location_for_client(client)
client_area_locations = client_area_locations.where(:id => client.id)
client_area_locations.first if client_area_locations
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment