My Recent Pastes (60 and counting)
All Pasties (over 60 and counting)
Below are summaries of the 15 most recent pasties by joshua.
September 03, 2007
11:44AM EDT
by joshua
View more (15 lines)
1 2 3 4 5 |
it "should be valid with default attributes" do
Locale.set('en', 'US')
city = City.find_by_name("barcelona")
event = city.events.create(:name => 'testing languages Event', :start_date => "2007-05-31")
event.update_attributes_with_translations({'es' => {'tag_list' => 'uno, dos'}, 'en' => {'tag_list' => 'one, two'}})
|
August 03, 2007
2:03PM EDT
by joshua
View more (217 lines)
1 2 3 4 5 |
Sphinx 0.9.7 Copyright (c) 2001-2007, Andrew Aksyonoff index 'lyrics': query 'querĂa ': returned 129 matches of 129 total in 0.000 sec |
August 03, 2007
10:33AM EDT
by joshua
View more (86 lines)
1 2 3 4 5 |
require File.dirname(__FILE__) + '/../test_helper' describe "A person with no privileges" do use_controller StoriesController |
July 13, 2007
1:43PM EDT
by joshua
View more (69 lines)
1 2 3 4 5 |
ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' require 'test/spec' require 'test/spec/rails' |
July 10, 2007
2:07PM EDT
by joshua
View more (67 lines)
1 2 3 4 5 |
require File.dirname(__FILE__) + '/../test_helper' describe "A person with no privileges" do use_controller StorySectionsController |
July 07, 2007
8:47PM EDT
by joshua
View more (69 lines)
1 2 3 4 5 |
require File.dirname(__FILE__) + '/../test_helper' describe "A story controller (in general)" do fixtures :people, :stories use_controller StoriesController |
June 28, 2007
1:34AM EDT
by joshua
View more (8 lines)
1 2 3 4 5 |
drawable = Magick::Draw.new
drawable.font = ("#{RAILS_ROOT}/design/fonts/Century Gothic")
drawable.font_family = ("Century Gothic")
drawable.annotate(final_intro, 0, 0, 8, 160, self.title) do
|
June 07, 2007
10:21PM EDT
by joshua
View more (11 lines)
1 2 3 4 5 |
def js(data)
if data.respond_to? :to_json
data.to_json
else
data.inspect.to_json
|
June 07, 2007
9:52PM EDT
by joshua
View more (30 lines)
1 2 3 4 5 |
require 'minus_mor' # Assign a new template type ActionView::Base::register_template_handler :ejs, MinusMOR::View Mime::Type.register "text/javascript", :js, %w( application/javascript application/x-javascript ), %w( ejs rjs ) |
June 01, 2007
3:30AM EDT
by joshua
View more (24 lines)
1 2 3 4 5 |
class PlaceAssetsController < AssetsController # These are resource_fu methods. delegate_resources_helpers :assets, :to => :place_assets delegate_url_helpers :asset_attachable, :to => :place |
May 22, 2007
10:40AM EDT
by joshua
View more (14 lines)
1 2 3 4 5 |
def test_invite_and_signup
new_session_as(:quentin) do |quentin|
quentin.goes_to_new_invite
quentin.creates_new_invite
|
May 22, 2007
8:03AM EDT
by joshua
View more (6 lines)
1 2 3 4 5 |
get_signed_url: function (the_method, callback, params) {
params = params || {};
default_params = {format: 'json', method: the_method, jsoncallback: callback};
request_hsh = new Hash();
params_hsh = $H($extend(default_params, params));
|
May 18, 2007
4:44AM EDT
by joshua
View more (23 lines)
1 2 3 4 5 |
String.extend({
htmlEncode: function() {
return this.
replaceAll('&', '&').
|
May 01, 2007
4:50PM EDT
by joshua
View more (304 lines)
1 2 3 4 5 |
# # Copyright (c) 2007 Joyent Inc. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
May 01, 2007
4:41PM EDT
by joshua
View more (122 lines)
1 2 3 4 5 |
# # Copyright (c) 2007 Joyent Inc. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
Pastie