Skip to content

Instantly share code, notes, and snippets.

@baron
baron / example.rb
Created February 15, 2010 12:20 — forked from developish/example.rb
@zipcode = Zipcode.find_by_name("85023")
# Passing in a hash of search parameters is more convenient for my purposes,
# but searchlogic allows the second, chained method of searching also works.
@locations = Location.by_location(:origin => @zipcode, :within => 10).search(:name_like => "searchlogic", :city_is => "Phoenix")
@locations = Location.by_location(:origin => @zipcode, :within => 10).name_like("searchlogic").city_is("Phoenix")
#!/usr/bin/env ruby
require 'optparse'
require 'rubygems'
require 'meow'
def usage!
puts $opt
exit
end