Skip to content

Instantly share code, notes, and snippets.

@zlu zlu/x
Created Jan 6, 2009

What would you like to do?
Ubiquity command for searching rails APIs
name: "rails",
takes: {"method": noun_arb_text},
icon: "",
homepage: "",
author: {name: "Zhao Lu", email: ""},
license: "MPL,GPL",
description: "Search rails documentation",
help: "Type a rails class or method",
execute: function(directObject)
var url = "{TERM}"
var urlString = url.replace("{TERM}", directObject.text);
preview: function(pblock, directObject)
searchText = jQuery.trim(directObject.text);
if(searchText.length <= 0)
pblock.innerHTML = "Search rails documentation";
var previewTemplate = "Search rails documentation of ${query}";
var previewData = {query: searchText};
pblock.innerHTML = CmdUtils.renderTemplate(previewTemplate, previewData);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.