Skip to content

Instantly share code, notes, and snippets.

@istvanp
Created September 20, 2011 07:58
Show Gist options
  • Save istvanp/1228600 to your computer and use it in GitHub Desktop.
Save istvanp/1228600 to your computer and use it in GitHub Desktop.
[
{
city: "Montreal",
first_name: "Istvan",
id: 1,
last_name: "Pusztai",
state: "Quebec",
avatar_url: "https://secure.gravatar.com/avatar/44c6f8371be4ee1612256855a3e35d12.png?s=48&d=http%3A%2F%2Frobohash.org%2F44c6f8371be4ee1612256855a3e35d12.png%3Fsize%3D48x48%26bgset%3Dany"
},
{
city: "Laval",
first_name: "Harry",
id: 3,
last_name: "Kavallos",
state: "Quebec",
avatar_url: "https://secure.gravatar.com/avatar/526bb7ac8a017f8f10a168c0afef7340.png?s=48&d=http%3A%2F%2Frobohash.org%2F526bb7ac8a017f8f10a168c0afef7340.png%3Fsize%3D48x48%26bgset%3Dany"
}
]
def search
respond_to do | format |
format.json { render json: User.search(params[:q]).all }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment