Skip to content

Instantly share code, notes, and snippets.

@cwoodcox
Created February 14, 2012 23:25
Show Gist options
  • Save cwoodcox/1831599 to your computer and use it in GitHub Desktop.
Save cwoodcox/1831599 to your computer and use it in GitHub Desktop.
if params[:q]
attrs = {
id: 0,
business_partner_id: 1,
street_number: params[:q]['near_filter(1)'],
city: params[:q]['near_filter(2)'],
state: params[:q]['near_filter(3)'],
zip_code: params[:q]['near_filter(4)'],
icon_name: "home"
}
l = Location.new(attrs)
l.geocode
collection << l
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment