Skip to content

Instantly share code, notes, and snippets.

<% form_tag book_path(book), :method => :delete do %>
<%= content_tag :button, 'Delete', :type => 'submit' %>
<% end %>
makeSearchCommand({
name: "Flickr-CC",
url: "http://www.flickr.com/search/?q={QUERY}&w=all&l=cc&ss=0&ct=0",
icon: "http://www.flickr.com/favicon.ico",
description: "Searches <a href=\"http://www.flickr.com\">Flickr</a> for Creative Commons-licensed pictures matching your words.",
preview : function(previewBlock, inputObject){
var inputText = inputObject.text;
if(inputText.length < 1) {
previewBlock.innerHTML = "Searches for photos on Flickr.";
# module: audit
class Audit < Thor
desc "all", "Run all audit tasks"
def all
%w(architecture database stats tests coverage flog roodi filesize).each do |task|
log "\n*** reviewing #{task}", true
log `thor audit:#{task}`, true
end
end
set :application, "forever_home"
set :repository, "[email protected]:railsrumble/leaf-on-the-wind.git"
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
set :deploy_to, "/var/www/#{application}"
# If you aren't using Subversion to manage your source code, specify
# your SCM below:
code:
$('a').click(function() {
$.ajax({dataType: 'script', type: 'get', url: 'bucket/new'});
return false;
});
results from IE7
Processing ApplicationController#index (for 192.168.0.199 at 2009-01-07 08:06:54) [POST]
Parameters: {"_"=>"1231333515818"}
ActionController::MethodNotAllowed (Only get requests are allowed.):
- (void)viewDidLoad {
self.list = [self.data JSONValue];
[self.images removeAllObjects];
self.images = [NSMutableDictionary dictionaryWithCapacity:[self.list count]];
for (id rawItem in self.list) {
NSDictionary *item = (NSDictionary *)rawItem;
@try {
[self.images setObject:[UIImage imageWithData: [NSData dataWithContentsOfURL: [NSURL URLWithString: [item objectForKey:@"image_url"]]]] forKey:[item objectForKey:@"image_url"]];
RailsConf BoF: Teaching Rails
The Rails community has a plethora of experienced, talented developers, who have contributed a great deal of advanced work to the ecosystem. As a group, however, we've lacked a consistent and welcoming approach for newcomers, be they programming newbies or people experienced in another technology.
In this BoF, we'll get together and think about ways to improve that — we'd love to hear insights from educators using Rails in the classroom, authors, bloggers, forum and mailing list contributors, and anyone else interested in making the learning process easier and friendlier.
class SimpleRackApp
def call(env)
[

status, # 200
headers, # {"Content-Type" => "text/html"}

body # ["<html>...</html>"]

]

end
end
module Rack
class Embiggener
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
headers.delete('Content-Length')
REQUESTING PAGE: POST /brands/1/offers with {"offer"=>{"media_attachments"=>[#<ActionController::TestUploadedFile:0x4676174 @content_type="image/jpeg", @original_filename="small-logo.jpg", @tempfile=#<File:/var/folders/KL/KL6JYYFfHeOrITh0QBYlH++++TI/-Tmp-/small-logo.jpg20090711-13717-37nq6a-0>>, "", ""]}} and HTTP headers {"HTTP_REFERER"=>"/brands/1/offers/new"}
Processing OffersController#create (for 127.0.0.1 at 2009-07-11 13:25:57) [POST]
Parameters: {"offer"=>{"media_attachments"=>"#<ActionController::TestUploadedFile:0x4676174>"}}